Sudoers in Ubuntu
By default, root acount in ubuntu is locked. This means that you cannot login as root directly or use the su command to become the root user, however, since the root account physically exists it is still possible to run programs with root-level privileges. This is where sudo comes in; it allows authorized users (normally "Administrative" users) to run certain programs as root without having to know the root password.
This means that in the terminal you should use sudo for commands that require root privileges; simply prepend "sudo" to all the commands you would normally run as root. For more extensive usage examples, please see below. Similarly, when you run GUI programs that require root privileges (e.g. the network configuration applet), you will also be prompted for a password. Just remember, when sudo asks for a password, it needs YOUR USER Password, and not the root account password.
How To add sudoers users in Ubuntu
All users in the admin group are sudoers. So, if you want some user to have sudo capability then you have to add it in that group. This is how to add it :
[email protected]:~$ sudo adduser eko admin
Adding user `eko' to group `admin'...
[email protected]:~$ sudo adduser mardi admin
Adding user `mardi' to group `admin'...
In /etc/group admin group will automatically added :
Problem when can't login using Root or SUDO Account
If we dont have Root password or dont have access using SUDO then here the trick: Start our ubuntu in recovery mode. In this way we will be logged in as root, without the need to type a password. If the recovery mode is not available, use a live distribution, mount the root partition and manually add the user we want in /etc/group in the line for the admin group, like this :
[email protected]:~$ sudo vi /etc/group
- roemasa's blog
- Add new comment
- 1450 reads