How do I login to Ubuntu 15.10 directly using root account?
5 Answers
Root account is disabled in Ubuntu for login by default. You would have to change root password to login directly.
Personally i suggest you login to root through your sudo account with sudo -i
-
Hi Serg, Thanks for your info. But is it possible to have root as a user in the login screen when you first enter Ubuntu OS? How can I do this? please tell me the steps, Thanks Jan 15, 2016 at 17:26
-
3So login to GUI with root . . . possible but not recommended, because you are going to be running the whole graphical environnment as root . . .which means security holes possible Jan 15, 2016 at 17:29
-
HI Serg,That's right. even if it implies security holes i'd like to try. Jan 15, 2016 at 17:59
-
Running a desktop as root will break it for the user used to install the system. If you want to use a root user use another operating system like Fedora, CentOS or SUSE and not a Debian based system.– RinzwindJan 16, 2016 at 7:10
Yes you can login as a root user however this is in no way suggested.
I would also recommend sudo -i
to emulate root. However this being Linux you can do as you wish and enable root. This can cause major security holes and is not recommend! sudo passwd root
create a password and now you can login as root.
To disable root sudo passwd -dl root
Single user mode will work, assuming your root account has a password.
At grub, choose Advanced. Cursor to kernel you want. Then "e" to edit grub stanza and change linux line to end "ro single". This is about 8 lines down usually longest line. Cut out silent and splash if they are on end. Then "x" launch system boot to prompt that asks for root password. There will be a reminder on how to launch at bottom of screen. I'm not sure if Alt-x might be needed (for sure, there is an x 😁)
If you really mean to ask this question, this is the right answer. I don't know why somebody gave you the -1 on this. It is a reasonable question. You should not have to give anybody "context" for this one.
Other answers seem to assume you are a moron. This part is not for novices. If you are, step back from it.
Also, ignore Ubuntu chorus 'there is no root user'. That's just silly. His home folder is /root. Giving that account a password is easy and it does nothing harmful AT ALL. @Rinzwind is not correct on that point. sudo will still work from user account .
First: There are legitimate reasons to log in as root, like when you are moving or archiving the location of your /home directory, and you don't want any artefacts or broken pipes from being logged in as a user.
Coming from OpenSUSE, not being able to log in as root definitely is not an improvement but a rather a nuisance.
Second: While Ubuntu succeeds in making logging in to the GUI difficult, at least under X11 you can use a command line console session rather easily after making sure, root has a password.
sudo passwd root
.- Log out.
- Press Ctrl+Alt+F3 for a console session.
- Log in as root in the console session.
You can now use a genuine root command-shell with /root being your $HOME and no users logged into your system. Also, the security holes speculated about by other posters do not exist in this setup, because the X-Server doesn't run.
After having finished your console session, log out with exit
or Ctrl-D, use Ctrl+Alt+F2 to go to the login prompt, log in again and continue your normal GUI life.
If you need login as root : Open terminal then type
sudo nano /etc/gdm3/custom.conf
Find line [security]
and replace to
[security]
AllowRoot=true
Save and exit. And run
sudo nano /etc/pam.d/gdm-password
Then replace this auth required pam_succeed_if.so user != root quiet_success
To #auth required pam_succeed_if.so user != root quiet_success
Save and exit
And restart computer.
sudo
is not Debian-specific. Most *nix systems use it (e.g. Mac OS X). And as far as I'm aware, most Linux systems recommend against root login.