Do you really want to enable root login (in GUI mode, from the login prompt) in Ubuntu 11.10 (Oneiric Ocelot) ? I don’t see any logical reason behind this because if you want to perform some administration task (or any task) then you can use ‘sudo‘ or gain temporary root power in terminal or simply open nautilus in root mode, for browsing such files; one the other hand, if you’ve logged in as root, then a little mistake may corrupt your whole system. That’s why, root account is disabled by default in most of the Linux distributions such as Ubuntu, and so you’re not recommended to enable or use it.
Anyway, if you want to try root (may be – just for Fun!), then in this post, you will learn how to unlock/activate GUI login as root, on Ubuntu 11.10 (although the command is same other versions as well as other Linux distros).
Unlock / Enable root account in Ubuntu 11.10
#1 : Open Terminal (Ctrl+Alt+t) and type the command.
sudo passwd root
#2 : Then you will be asked to enter your login password, followed by the password of ROOT account (enter new UNIX password). Enter it twice, and if everything is ok, then you will get a confirmation message (look at the snapshot of terminal : below).
#3 : Now, it’s the time to test root login in gui mode. To do that – simply logout from the current session and select root as user, and enter the password (entered in above step). That’s all, enjoy root mode (be careful) and return back to your normal user account as soon as possible.
Recommended Alternative ways to gain root power on Ubuntu
Since logging into root account isn’t a good way for administrative purposes, you should any of these methods (it depends on task, e.g for successive administrative task su command will be better) for tasks that requires root permission/power.
Using sudo while performing administrative tasks
The thumb of rule is that, if any command doesn’t executed with the error message then simply – append sudo in beginning and try again. Then it will ask you to enter ‘[sudo] password for user_x‘ – just enter password for user_x. By default it may remember it for next few minutes, so you won’t have to type again for next sudo command.
e.g
apt-get install some_program
=> Permission Denied
Then add sudo and try again (enter your login password, remember enter password for ),
sudo apt-get install some_program
=> get your job done! 🙂
su command for temporary root power
This command is almost similar to previous one but it requires root password, so root account must be enabled for this to work. To go to root mode, at terminal just type the command, followed by root password.
bean@bean-desktop:~$ su
After entering the correct password, you will be entered into root mode and the prompt will change into (notice the # (indicates root) instead of $ (indicates user) ) –
root@bean-desktop:/home/bean#
Run nautilus with root power
If you are doing some files/directory related work then it’s very handy to start the nautilus in root mode. To do that – you can use root browser plugin in nautilus but the command is also very simple. Open terminal and type (any one) –
Update! If you are going to open graphical applications in root mode, then better use gksudo app_name (if you’re using Gnome desktop) or kdesudo app_name (if you’re running KDE desktop). Thanks to @Jak138 🙂
gksudo nautilus
gksu nautilus
I hope you enjoyed reading the article, although this article has been written primarily for Ubuntu but the tips works as expected, in other Linux distros such as Fedora, Linux Mint, OpenSuse, Debian, etc. If any problem occurs or you want to share your experience – then express it through the comment. Have Fun!
Nice and brief article. I like that. FYI “gksu nautilus” or “gksu thunar” (i personally like thunar), is generally a better commmand than “sudo nautilus” especially if you make a launcher or shortcut. “sudo nautilus” tends to cause errors for some reason. Never really looked into why…….
You’re right, gksudo nautilus or gksu nautilus is good for opening graphical applications in root mode. Thanks 🙂
sudo nautilus! Wow, don’t think it should have been so hard to google and find this, but I’m glad I finally did! Thanks!
Just an example where you NEED root login:
To move a server to VMWare ESX, you have to create an image of a running machine.
To do that, VMware wizard need to ave a genuine root privilege access, not a “sudo”.
Sometimes there is a reason to to something….. sometime is just for fun.
In any case… is a nice article
hi.. me ubuntu how terminal error passwd ..
just type “sudo root password” enter ,is it din’t work ” root password”
enter new unix password :type your password
That is because it isnt:
sudo root password
It is:
sudo root passwd
or if you want to start it on grapic mode than use command ” startx” and if your grapic is install it will to grapic if not it will show you a command to write to insall grapic :
why don’t you just answer the question – instead of being an ass.
Not working… ok i have change password… but after logout and relogin i obtain BLACK SCREEN 🙁
hi i want to block usb drives in my office pls help me to do dis.
i already try many steps & commands but i am not succeeded in doing that pls anybody help me
Thanks!
I joined Faze and optic and I like plums