One of the reasons why Ubuntu, and Linux in general, is so secure is because the permissions to change any part of the system is tightly controlled. Most changes require entering the user’s password (which will alert the user of malware if a prompt comes up without having done anything). It is interesting that Windows Vista has taken this approach several years decades after Linux has had this.
Trying to log in to Ubuntu as a root user can be like banging your head on a rock. Sometimes, crucial configuration changes require logging in as root user. This tutorial will show you how to log in to Ubuntu as root. You have to make two changes before you can log in to Ubuntu as root.
- Set the root password: Go to System> Administration> Users and Groups. Select “root”. Click Unlock, enter the password for the account you are logged into as, and hit close. Then, click Properties, select “Set password by hand”, and set the root password.
- Enable the root login: Go to System> Administration> Login Window. Click Security tab. Check “Allow local administrator login”. Click on OK.
- Log out, then enter root for user name and the password you set in the first step and click Login.
Also see: How to install Arial, Verdana and other fonts in Ubuntu, other Ubuntu tips
Note that logging in with root account should be used only for the most essential purposes (usually changing system files for configuration). Logging in as root account presents serious security problems, and can leave you vulnerable to attacks (because any hacker knows that there is a root account). For added security, disconnect your internet (switch off/disconnect modem) before logging in as root.
ADVERTISEMENT
When the grub loads select the recovery mode
There you willget some think like
root@computer#
use
there you will be asked to set new unix password
confirm the password
now restart
when the login screen appears select other then use username root
and password that you selected there
sudo -s -H
@xenomorf: This has been tested on Ubuntu Hardy and Intrepid. Did you try the steps properly?
i try to use the SU in the terminal but it say, Authentication Failed. why is that?
@Izkata
Logging in as root is not safe, but there might be other situations where logging in to root is easier (as I had to when setting up graphics).
In that case, “sudo nautilus” or “gksu nautilus” – there is NEVER a need to log in as root.
@Aled: The only problem with sudo will be when you need to do several complex edits. I had to do it (hacked several files) to get my unconventional modem working, and I’m sure there are others who face the same problem. This guide is targeted towards such folks.
What about using ‘sudo su -’ that will log you in as root on the terminal without the need to use the root password, rather more just your own password. At least, that’s how I’ve done it, if I’ve been missing something vital please do tell me, I’m always willing to learn more about linux.
@Jon: Using sudo is the better way out, but if you have to do more complex tasks, say editing config files for hardware (I had to do that for my modem), using root account is the best option.
much easier way: fire up a terminal, type sudo passwd
The info was helpful.
Thanks.
Mark