How do I login to Ubuntu 15.10 directly using root account?
-
3Please give some context: it depends what you mean by *"login"* and it depends what you mean by *"directly"*. What are you trying to do, exactly? – steeldriver Jan 15 '16 at 16:39
-
Hi, what i would like to do is to enter from the login screen when i start my pc so that I see root as user an then I enter the password which i have already set thru # sudo passwd root. Sorry i was not very specific first. Any advice would be appreciated – dante becerra lagos Jan 15 '16 at 16:52
-
4There are two reasons root login is disabled. First, it is insecure. Second it is unnecessary. – Marc Jan 15 '16 at 17:25
-
1If you want to use a system with root Ubuntu is not your operating system and try Fedora, CentOS or SUSE. Debian based systems use "sudo". – Rinzwind Jan 16 '16 at 06:27
-
@Rinzwind `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. – wjandrea Dec 24 '17 at 19:32
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
- 103,293
- 19
- 273
- 492
-
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 – dante becerra lagos Jan 15 '16 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 – Sergiy Kolodyazhnyy Jan 15 '16 at 17:29
-
HI Serg,That's right. even if it implies security holes i'd like to try. – dante becerra lagos Jan 15 '16 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. – Rinzwind Jan 16 '16 at 07: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
- 1,478
- 1
- 14
- 18
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.
- 10,473
- 10
- 45
- 62
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 .
- 3,593
- 1
- 20
- 33
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.