I have installed ubuntu 11.10 with no problem. But after login as a normal user, I am unable to switch to super user(using "su" command). Its showing "Authentication failure" plz help me..
3 Answers
In Ubuntu and other Debian-based systems, by default root
user has no password set, so it is impossible to log in directly as root or to become root by using su
command.
Instead, Ubuntu uses sudo
command which allows much more flexible management of permissions - users can perform administrative tasks without knowing root password.
While it is possible to give root user a password, it is not necessary and not recommended.
You can see my answer to this question for more details.
In short, when you need to get root console, you type
sudo su
and then enter your own password. More often, if you want to run a single command as superuser, you just type
sudo command
and, again, enter your own password
sudo su
in a terminal, after you type your login password, will turn you root. After this, you can give the command
passwd
which will allow you to give a new password for root (this will not alter your login password). This is the password that you will type every time you use the
su
command, because it will be taken as it is the super user's password.
-
Giving
root
a password is not a normal or recommended practice in Ubuntu. Instead of showing how to shoot himself in the foot to a user who clearly does not understand how things work in Ubuntu, you could've explained how to do it properly.– SergeyMar 3, 2012 at 9:29