LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Adding local user to sudoers file (http://www.linuxquestions.org/questions/linux-newbie-8/adding-local-user-to-sudoers-file-745097/)

deibertine 08-04-2009 03:05 PM

Adding local user to sudoers file
 
I am trying to enable my local user to have same priv. as the root login.

I have added this in the sudoers file:

# 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
# %wheel ALL=(ALL) ALL
# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
jameslee ALL=(ALL) NOPASSWD:ALL
andrewbyson ALL=(ALL) NOPASSWD:ALL

I wanted that both james and andrew to have the ability to run scripts without entering or being promoted by a password.

So far the script above didnt do the trick for me.

Anyone has any advise that you could provide to possibly resolve this issue?

I'd appreciate it!

Cheers!
DB

chrism01 08-04-2009 07:09 PM

I think you're missing a space there:
http://www.sudo.ws/sudo/sample.sudoers

Tinkster 08-04-2009 07:41 PM

Quote:

Originally Posted by deibertine (Post 3631297)
I am trying to enable my local user to have same priv. as the root login.

I have added this in the sudoers file:

# 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
# %wheel ALL=(ALL) ALL
# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
jameslee ALL=(ALL) NOPASSWD:ALL
andrewbyson ALL=(ALL) NOPASSWD:ALL

I wanted that both james and andrew to have the ability to run scripts without entering or being promoted by a password.

So far the script above didnt do the trick for me.

Anyone has any advise that you could provide to possibly resolve this issue?

I'd appreciate it!

Cheers!
DB

How did you edit the file? Chances are that (if you didn't
use visudo, and the editor in use isn't vi) the file is
messed up, and hence doesn't get pulled at all.




Cheers,
Tink

deibertine 08-05-2009 02:09 PM

It turned out to be a sshd issue where generating a new key did it for us.
ssh-keygen -t rsa

Thanks to all who posted!

DB


All times are GMT -5. The time now is 09:34 AM.