LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 08-04-2009, 02:05 PM   #1
deibertine
Member
 
Registered: Mar 2009
Posts: 222

Rep: Reputation: 30
Smile 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
 
Old 08-04-2009, 06:09 PM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,232

Rep: Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024
I think you're missing a space there:
http://www.sudo.ws/sudo/sample.sudoers
 
Old 08-04-2009, 06:41 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,965
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
Quote:
Originally Posted by deibertine View Post
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
 
Old 08-05-2009, 01:09 PM   #4
deibertine
Member
 
Registered: Mar 2009
Posts: 222

Original Poster
Rep: Reputation: 30
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
 
  


Reply

Tags
root, sudo, sudoers


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
User not in the sudoers file ersek Linux - Newbie 10 06-09-2009 12:35 PM
adding user to sudoers file in moblin retsoced Linux - Mobile 3 03-17-2009 05:31 AM
Adding a user to the sudoers file? annihilan Slackware 5 11-13-2008 04:36 PM
how a user can be added to sudoers file. afaheem1988 Linux - Newbie 5 08-10-2008 07:15 PM
Debian user not in sudoers file... phantom_cyph Linux - General 3 04-08-2007 01:08 PM


All times are GMT -5. The time now is 09:08 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration