Click to See Complete Forum and Search --> : Sudoers


pug
03-18-2002, 08:05 PM
More help with sudo please! I am trying to give one user (pug) access to run anything without the need for a password, this is my sudoers file at the moment

# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# Defaults specification

# User privilege specification
root ALL=(ALL) ALL

# Uncomment to allow people in group wheel to run all commands
# %pug ALL=(ALL) ALL

# Same thing without a password
%pug ALL=(ALL) NOPASSWD: ALL

# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now


put I still get a prompt for the root password to do anything??? Have also tried adding the line

pug ALL=(ALL) ALL NOPASSWD: ALL

below the root one but neither work for me? is there anything you need to do to active the sudoers file once it is edited?

Thanks in advance

scanez
03-18-2002, 08:07 PM
pug ALL=NOPASSWD:ALL

pug
03-18-2002, 08:18 PM
thanks take it you mean to put that line below the root entry??? have done and still get a prompt to enter the root password, do I need to reboot for changes to take effect/stop and start a service??

I put the line in using visudo and then use :wq to exit then try opening File Manager (Super User Mode) to test if it works is that right?

Thanks

pug
03-19-2002, 07:13 AM
anyone help please?! :confused:

scanez
03-19-2002, 12:33 PM
Hrm...that's what I have in my /etc/sudoers and it works fine, didn't have to restart anything. Which distro? Maybe there is something you have to restart (I use Debian) with yours. How are you using sudo?

sudo program

like that ^?

pug
03-19-2002, 12:44 PM
hi I dont know quite how to "use" sudo I have installed the rpm and edited the sudoers file and restarted the system but I still get prompted for passwords? I use mandrake 8.1, thanks

scanez
03-19-2002, 12:46 PM
I mean, when you are trying to run a program as superuser with sudo, say apt-get update in Debian, I have to do

sudo apt-get update

from a terminal. That is, put "sudo" before the actual command I want to run. You say you are tying to use a file manager, then you would have to do

sudo file_manager_name

and such.

pug
03-19-2002, 01:39 PM
ahhh! I understand now, I was thinking it ran as a sort of service and automatically responded to the prompts for passwords I did not think you had to invoke it buy utting sudo infrom the of the command you want to run.

I have edited my KDE menu and put sudo in from of the command and now when I click on them it works :)

Thanks for your help