# Problem with sudo cookbook

**URL:** <https://discourse.chef.io/t/problem-with-sudo-cookbook/2017>\
**Category:** Chef Infra (archive)\
**Created:** [August 11, 2011, 3:49pm UTC](https://discourse.chef.io/t/problem-with-sudo-cookbook/2017 "2011-08-11T15:49:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Franck\_Meignen](https://avatars.discourse-cdn.com/v4/letter/f/71e660/32.png) [@Franck\_Meignen](https://discourse.chef.io/u/Franck_Meignen)\
**Post date:** [August 11, 2011, 3:49pm UTC](https://discourse.chef.io/t/problem-with-sudo-cookbook/2017/1 "2011-08-11T15:49:23Z")

</div>

```
Hi everyone,

I have a testing chef server, and i got a problem with the sudo
cookbook.

i have databags with 3 users (admins) the sudo cookbook with 3 users
in my template, they are applied to my servers, but on a specific
server, there is already some sudo rules, and when chef-client
starting, the cookbook erase the existant sudo rules.

How can i do to keep my existing sudo rules on this specific server
using the sudo cookbook?

Thanks for your help

Best regards

Franck
```

---

<div class="post-metadata">

**Author:** ![Ranjib\_Dey](https://avatars.discourse-cdn.com/v4/letter/r/8e8cbc/32.png) [@Ranjib\_Dey](https://discourse.chef.io/u/Ranjib_Dey)\
**Post date:** [August 11, 2011, 5:47pm UTC](https://discourse.chef.io/t/problem-with-sudo-cookbook/2017/2 "2011-08-11T17:47:28Z")

</div>

Add an additional role to that node/server which adds those additional  
sudo rules. Currently the sudoers cookbook does not support fine grained  
control (it gives flat all commands privileges as all users to all  
hosts), we have tweaked it to suit our need, let me know if you need  
that kinda feature.  
On Thu, 2011-08-11 at 17:49 +0200, Franck Meignen wrote:

> Hi everyone,
> 
> I have a testing chef server, and i got a problem with the sudo  
> cookbook.
> 
> i have databags with 3 users (admins) the sudo cookbook with 3 users  
> in my template, they are applied to my servers, but on a specific  
> server, there is already some sudo rules, and when chef-client  
> starting, the cookbook erase the existant sudo rules.  
> How can i do to keep my existing sudo rules on this specific server  
> using the sudo cookbook?
> 
> Thanks for your help
> 
> Best regards
> 
> Franck
