View previous topic :: View next topic |
Author |
Message |
Wake Rider n00b

Joined: 01 Mar 2008 Posts: 25
|
Posted: Sun Mar 02, 2008 5:14 am Post subject: Granting sudo permissions to a user |
|
|
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 |
|
 |
desultory Bodhisattva


Joined: 04 Nov 2005 Posts: 9410
|
Posted: Sun Mar 02, 2008 6:58 am Post subject: |
|
|
/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 |
|
 |
aronparsons Tux's lil' helper

Joined: 04 Oct 2004 Posts: 117 Location: Virginia
|
Posted: Mon Mar 03, 2008 6:02 am Post subject: |
|
|
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 |
|
 |
guttersnipe n00b


Joined: 28 Jun 2007 Posts: 35
|
Posted: Mon Mar 03, 2008 12:31 pm Post subject: |
|
|
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 |
|
 |
alvaroguimaraes n00b

Joined: 03 Mar 2008 Posts: 1 Location: Santa Bárbara D'Oeste - São Paulo - Brazil
|
Posted: Mon Mar 03, 2008 5:27 pm Post subject: |
|
|
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 |
|
 |
|