Do you ever wish that you could enable the su command on Linux Mint 13 or Ubuntu? Well read on and you will learn how to accomplish this.
By default the sudo command is used to run a command as the superuser; this command is controlled by the /etc/sudoers.
This is what the file looks like.
[flynn@flynn-grid-runner flynn]$ sudo cat /etc/sudoers [sudo] password for flynn: # # This file MUST be edited with the 'visudo' command as root. # # Please consider adding local content in /etc/sudoers.d/ instead of # directly modifying this file. # # See the man page for details on how to write a sudoers file. # Defaults env_reset Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" # Host alias specification # User alias specification # Cmnd alias specification # User privilege specification root ALL=(ALL:ALL) ALL # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL # Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) ALL # See sudoers(5) for more information on "#include" directives: #includedir /etc/sudoers.d
As shown in this output below my user flynn is a member of the sudoers group; this allows him to run the sudo command.
[flynn@flynn-grid-runner flynn]$ sudo cat /etc/group | grep sudo sudo:x:27:flynn,hoshi
But if you want to unlock the root account and access it via the su command; then use the sudo passwd root command to give the root account a password and then you may access the root account in the traditional way.
[flynn@flynn-grid-runner flynn]$ sudo passwd root Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully [flynn@flynn-grid-runner flynn]$
After this you will be able to access the root account by typing the su command then entering your password.