6

On Ubuntu 11.10, I enabled the graphical login as root by (at least I think so) running
sudo passwd

After upgrading to 12.04 LTS, the graphical option has gone, while su in the Terminal is still working.
I ran sudo passwd once again, but I got no result...

Any ideas?

PS: I DO know the risks involved in enabling root, so please don't ask that.

4
  • 1
    You claim to know, and yet, here you are, asking how to do it. Check out man passwd for answers. May 24, 2012 at 17:22
  • 1
    I believe they were referring to knowing the inherent risks associated with enabling root.
    – reverendj1
    May 24, 2012 at 17:23
  • @reverendj1 Exactly.
    – jazzpi
    May 24, 2012 at 17:25
  • @jazzpi Instead of writing [solved] in the post's title please use the green check mark to select the answer that you consider helped you solve your issue. May 24, 2012 at 17:49

3 Answers 3

12

First, check that the file /etc/lightdm/lightdm.conf is there. If it is, then do this:

sudo passwd root
sudo sh -c 'echo "greeter-show-manual-login=true" >> /etc/lightdm/lightdm.conf'

Root won't show up as a user, but "Login" will, which is how you manually log in with users not shown in the greeter.

Rebooted and then you should be able to login as root.

6
  • jazzpi, Please mark the answer.
    – saji89
    May 24, 2012 at 17:31
  • This is not working in ubuntu patched for edubuntu. I still can't see root user while login. It just asks me password for the current user.
    – user112401
    Dec 3, 2012 at 13:11
  • @bob I'm not sure of what the differences are for Edubuntu. Is there no "Login" option? You would have to click that and enter root for the username. Root will not be listed on the login screen. If that doesn't work, please create a new question.
    – reverendj1
    Dec 3, 2012 at 20:04
  • Note: I needed to restart the computer to see the new Login option. Just logging out did not show the changed login screen.
    – Eponymous
    May 14, 2013 at 21:10
  • 1
    That answer by itself breaks entire Ubuntu GUI if you didn't have file lightdm.conf previously (like I had on fresh system). You need to write more stuff to that file if it was missing, per askubuntu.com/questions/141009/…
    – Cozzamara
    Aug 23, 2014 at 1:12
0

How can I log in as root on Ubuntu During the installation of Ubuntu 12.04 LTS you will not be asked to submit a root password. If you wish to log in as root you will first need to create a root account. You can do this by following these steps:

  1. Login to your vps.

  2. Use this command: sudo passwd root

  3. Enter the password that you submitted during the installation and subsequently submit and resubmit the new password.

  4. Use the su command to sign in as root user.

It would be better to use sudo to execute all your commands.

1
  • FYI there is already a root account so no need to create one. You just need to activate the password for it. The process is exactly how you describe in your post.
    – hmayag
    May 4, 2014 at 21:25
0

It may Broke your Ubuntu Installation & if that happens do Ctrl + Alt + F2 after selecting default option and then

trucate -s 0 /etc/lightdm/lightdm.conf

and then Reboot

1
  • He said he didn't want to reboot if possible...
    – anonymous2
    Jun 24, 2016 at 12:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .