How to give a standard Ubuntu User full root permissions.
Posted January 15, 2007
on:Granting All(root) Access to Specific Users
You can grant users bob and bunny full access to all privileged commands, with this sudoers entry. (add it to the file: /etc/sudoers). I do not recommend this, however sometimes you may want to achieve this.
bob, bunny ALL=(ALL) ALL
This is generally not a good idea because this allows bob and bunny to use the su command to grant themselves permanent root privileges thereby bypassing the command logging features of sudo. The example on using aliases in the sudoers file shows how to eliminate this prob.
Granting Access To Specific Users To Specific Files
This entry allows user peter and all the members of the group operator to gain access to all the program files in the /sbin and /usr/sbin directories, plus the privilege of running the command /usr/local/apps/check.pl. Notice how the trailing slash (/) is required to specify a directory location:
peter, %operator ALL= /sbin/, /usr/sbin, /usr/local/apps/check.pl
Notice also that the lack of any username entries within parentheses () after the = sign prevents the users from running the commands automatically masquerading as another user. This is explained further in the next example.
Using syslog To Track All sudo Commands
All sudo commands are logged in the log file /var/log/messages which can be very helpful in determining how user error may have contributed to a problem. All the sudo log entries have the word sudo in them, so you can easily get a thread of commands used by using the grep command to selectively filter the output accordingly.
Here is sample output from a user bob failing to enter their correct sudo password when issuing a command, immediately followed by the successful execution of the command /bin/more sudoers
2 Responses to "How to give a standard Ubuntu User full root permissions."
Please do not listen to this. Use ‘visudo’ at the very least. But if it is ubuntu you should simply add them to the sudo group. At least one person I know has locked themselves out with a bad edit.
1 | artpablico
January 6, 2010 at 6:28 am
Can you pls. do an article how the sudoers file really work? I found the help.ubuntu.com version still confusing, you seem kinda get it.