0

How do I login to Ubuntu 15.10 directly using root account?

5
  • 3
    Please 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? 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 Jan 15 '16 at 16:52
  • 4
    There are two reasons root login is disabled. First, it is insecure. Second it is unnecessary.
    – Marc
    Jan 15 '16 at 17:25
  • 1
    If 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 6: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
4

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

4
  • 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 '16 at 17:26
  • 3
    So 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 '16 at 17:29
  • HI Serg,That's right. even if it implies security holes i'd like to try. 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 7:10
1

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

You can read more about root access here.

0

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 .

0

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.

  1. sudo passwd root.
  2. Log out.
  3. Press Ctrl+Alt+F3 for a console session.
  4. 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.

-1

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.