Results 1 to 4 of 4
I'm a normal user 'sthakkar' on Linux platform. I had the root passwd and I tried to modify the /etc/sudoers file.
[sthakkar@linux log]$su
Password:
[sthakkar@linux log]# visudo /etc/sudoers
Code:
Host_Alias ...
- 01-11-2008 #1Just Joined!
- Join Date
- Apr 2007
- Posts
- 59
/etc/sudoers file
I'm a normal user 'sthakkar' on Linux platform. I had the root passwd and I tried to modify the /etc/sudoers file.
[sthakkar@linux log]$su
Password:
[sthakkar@linux log]# visudo /etc/sudoers
When I do:Code:Host_Alias MACHINE= linux User_Alias USER= sthakkar Cmnd_Alias YPBIND= ypbind Runas_Alias ROOT= root USER RHEL4 = (root) NOPASSWD: /sbin/ypbind
[sthakkar@linux log]$sudo -u sthakkar /sbin/ypbind
sthakkar is not in the sudoers file. This incident will be reported.
Why?
- 01-11-2008 #2Just Joined!
- Join Date
- Apr 2007
- Posts
- 59
it works
The above things wirks when I comment the Cmnd_Alias.
Now, I want to give permissions to edit /etc/services file.?
Should I use 'sudoedit'?
- 01-11-2008 #3
Running
# visudo
is sufficient (without specifying a file).
When you run
sudo -u sthakkar /sbin/ypbind
you're telling sudo to run /sbin/ypbind as sthakkar. I don't think that's what you want. Remove the -u option.
Finally, why do you need to edit the /etc/services file?
- 01-11-2008 #4Just Joined!
- Join Date
- Apr 2007
- Posts
- 59
Thanks ...
we are product based company and we have a product where we should add our service to /etc/services.


Reply With Quote