Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Granting sudo permissions to a user
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Wake Rider
n00b
n00b


Joined: 01 Mar 2008
Posts: 25

PostPosted: Sun Mar 02, 2008 5:14 am    Post subject: Granting sudo permissions to a user Reply with quote

How do I set sudo to give my ordinary user full root access like it has in Ubuntu? I like being able to install as a regular user and I also need sudo for mounting drives.
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Sun Mar 02, 2008 6:58 am    Post subject: Reply with quote

/etc/sudoers:
# 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

Moved from Installing Gentoo to Networking & Security.
Back to top
View user's profile Send private message
aronparsons
Tux's lil' helper
Tux's lil' helper


Joined: 04 Oct 2004
Posts: 117
Location: Virginia

PostPosted: Mon Mar 03, 2008 6:02 am    Post subject: Reply with quote

Use something like the following to require a password on all commands except those that don't impose a major security risk for a desktop system (e.g. /bin/mount). If you just have 'NOPASSWD' for all root commands, you're not really providing any extra security.

Code:
username    ALL = PASSWD: ALL, NOPASSWD: /bin/mount, /bin/umount
Back to top
View user's profile Send private message
guttersnipe
n00b
n00b


Joined: 28 Jun 2007
Posts: 35

PostPosted: Mon Mar 03, 2008 12:31 pm    Post subject: Reply with quote

Also, you shouldn't edit /etc/sudoers by hand. Use the command "visudo"
$ visudo

Scroll down to
Code:

# User privilege specification
root    ALL=(ALL) ALL

...and change it like so:
Code:

# User privilege specification
root    ALL=(ALL) ALL
username ALL=(ALL) ALL
Back to top
View user's profile Send private message
alvaroguimaraes
n00b
n00b


Joined: 03 Mar 2008
Posts: 1
Location: Santa Bárbara D'Oeste - São Paulo - Brazil

PostPosted: Mon Mar 03, 2008 5:27 pm    Post subject: Reply with quote

If you want no password:

Code:
# User privilege specification
root    ALL=(ALL) ALL
username ALL=(ALL) NOPASSWD:ALL


But this is really not recommended.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum