/etc/sudoers problem, config works on machine B, but not on A
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I've created a user noc and gave it a permission to run with sudo. I've added the following lines to the sudoers file.
Cmnd_Alias NOC = /etc/init.d/tomcat
noc ALL=(ALL) NOPASSWD: NOC
Problem is that when I try run sudo /etc/init.d/tomcat status
on machine A
it says: "noc is not in the sudoers file. This incident will be reported"
but I run the same command with same configuration on machine B, it works fine.
things I've checked:
- sudoers file permission is set to 0440
- all lines in sudoers file on both machines are the exact same
I have CentOS 6.8 with latest updates installed.
sudo sudoedit
 |Â
show 2 more comments
up vote
0
down vote
favorite
I've created a user noc and gave it a permission to run with sudo. I've added the following lines to the sudoers file.
Cmnd_Alias NOC = /etc/init.d/tomcat
noc ALL=(ALL) NOPASSWD: NOC
Problem is that when I try run sudo /etc/init.d/tomcat status
on machine A
it says: "noc is not in the sudoers file. This incident will be reported"
but I run the same command with same configuration on machine B, it works fine.
things I've checked:
- sudoers file permission is set to 0440
- all lines in sudoers file on both machines are the exact same
I have CentOS 6.8 with latest updates installed.
sudo sudoedit
I'm not sure if necessary, but did you log out then back in with noc?
â Sparhawk
Jul 5 at 6:15
1
Related - askubuntu.com/questions/665950/â¦.
â slmâ¦
Jul 5 at 6:21
1
have you runsudo -l
as user noc, to make sure the sudo rule is truly there ?
â steve
Jul 5 at 6:43
yes user is truely there
â Ali Golestan
Jul 5 at 6:50
sdiff the 2 files b/w the 2 servers and double check that they're not different.
â slmâ¦
Jul 5 at 9:49
 |Â
show 2 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I've created a user noc and gave it a permission to run with sudo. I've added the following lines to the sudoers file.
Cmnd_Alias NOC = /etc/init.d/tomcat
noc ALL=(ALL) NOPASSWD: NOC
Problem is that when I try run sudo /etc/init.d/tomcat status
on machine A
it says: "noc is not in the sudoers file. This incident will be reported"
but I run the same command with same configuration on machine B, it works fine.
things I've checked:
- sudoers file permission is set to 0440
- all lines in sudoers file on both machines are the exact same
I have CentOS 6.8 with latest updates installed.
sudo sudoedit
I've created a user noc and gave it a permission to run with sudo. I've added the following lines to the sudoers file.
Cmnd_Alias NOC = /etc/init.d/tomcat
noc ALL=(ALL) NOPASSWD: NOC
Problem is that when I try run sudo /etc/init.d/tomcat status
on machine A
it says: "noc is not in the sudoers file. This incident will be reported"
but I run the same command with same configuration on machine B, it works fine.
things I've checked:
- sudoers file permission is set to 0440
- all lines in sudoers file on both machines are the exact same
I have CentOS 6.8 with latest updates installed.
sudo sudoedit
edited Jul 5 at 9:48
slmâ¦
233k65479651
233k65479651
asked Jul 5 at 5:46
Ali Golestan
130212
130212
I'm not sure if necessary, but did you log out then back in with noc?
â Sparhawk
Jul 5 at 6:15
1
Related - askubuntu.com/questions/665950/â¦.
â slmâ¦
Jul 5 at 6:21
1
have you runsudo -l
as user noc, to make sure the sudo rule is truly there ?
â steve
Jul 5 at 6:43
yes user is truely there
â Ali Golestan
Jul 5 at 6:50
sdiff the 2 files b/w the 2 servers and double check that they're not different.
â slmâ¦
Jul 5 at 9:49
 |Â
show 2 more comments
I'm not sure if necessary, but did you log out then back in with noc?
â Sparhawk
Jul 5 at 6:15
1
Related - askubuntu.com/questions/665950/â¦.
â slmâ¦
Jul 5 at 6:21
1
have you runsudo -l
as user noc, to make sure the sudo rule is truly there ?
â steve
Jul 5 at 6:43
yes user is truely there
â Ali Golestan
Jul 5 at 6:50
sdiff the 2 files b/w the 2 servers and double check that they're not different.
â slmâ¦
Jul 5 at 9:49
I'm not sure if necessary, but did you log out then back in with noc?
â Sparhawk
Jul 5 at 6:15
I'm not sure if necessary, but did you log out then back in with noc?
â Sparhawk
Jul 5 at 6:15
1
1
Related - askubuntu.com/questions/665950/â¦.
â slmâ¦
Jul 5 at 6:21
Related - askubuntu.com/questions/665950/â¦.
â slmâ¦
Jul 5 at 6:21
1
1
have you run
sudo -l
as user noc, to make sure the sudo rule is truly there ?â steve
Jul 5 at 6:43
have you run
sudo -l
as user noc, to make sure the sudo rule is truly there ?â steve
Jul 5 at 6:43
yes user is truely there
â Ali Golestan
Jul 5 at 6:50
yes user is truely there
â Ali Golestan
Jul 5 at 6:50
sdiff the 2 files b/w the 2 servers and double check that they're not different.
â slmâ¦
Jul 5 at 9:49
sdiff the 2 files b/w the 2 servers and double check that they're not different.
â slmâ¦
Jul 5 at 9:49
 |Â
show 2 more comments
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f453531%2fetc-sudoers-problem-config-works-on-machine-b-but-not-on-a%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
I'm not sure if necessary, but did you log out then back in with noc?
â Sparhawk
Jul 5 at 6:15
1
Related - askubuntu.com/questions/665950/â¦.
â slmâ¦
Jul 5 at 6:21
1
have you run
sudo -l
as user noc, to make sure the sudo rule is truly there ?â steve
Jul 5 at 6:43
yes user is truely there
â Ali Golestan
Jul 5 at 6:50
sdiff the 2 files b/w the 2 servers and double check that they're not different.
â slmâ¦
Jul 5 at 9:49