Please: correct & exact steps to enable graphical root login 18.04.x ?!?

Yes - full graphical root login - on my own system - for my own uses only.
Nobody else even touches it...ever.
I know about all the warnings - so please, kindly no repeats of that stuff in reply here.

I have some things I need to do which absolutely need a full root login at my NB - I have tried all other means around this & none worked.

Also did a bunch of open searching but found nothing directly applicable - so here I am asking in hopes someone will kindly direct me, please.

The steps I followed thus far did work on earlier versions, but are no longer working with 18.04.2

I have already=>

  1. gave the root account a password with sudo passwd root
  2. enabled the root account: sudo usermod -U root
    Then verified that the root account exists with: sudo su - root
  3. next was sudo passwd -u root
  4. As root, created a new file /etc/lightdm/lightdm.conf.d/10-ubuntu.conf and added the following lines to it:

[SeatDefaults]
user-session=mate
greeter-show-manual-login=true
greeter-hide-users=true
allow-guest=false

  1. Set that file's permissions:
    sudo chmod 644 /etc/lightdm/lightdm.conf.d/10-ubuntu.conf
    sudo chown root:root /etc/lightdm/lightdm.conf.d/10-ubuntu.conf

Then rebooted the login box was there, but not allowed to type in
the desired username at all.

Help ?!? Please ?!?
Thanks.

well the problem is ......you are telling us gentle members of a UM forum you know best but I suspect you have not understood 2 things

one is pam.....and I am no expert but that will IMHO be your answer and
two....you do not know how to use root correctly if you truly want a root system

lets do the easy one first
Do you know what these mean?
sudo su
su -
su

Knowing these will help you and if you do know their differences you may well need to go back to sudo.....hint hint

pam....You may like to read
http://linux-pam.org/Linux-PAM-html/Linux-PAM_SAG.html
files under /etc/pam.conf
dir files under /etc/pam.d

good luck

alternatively why not try distros that by design run as root?
most Puppy types do....I like fatdog64
https://distrowatch.com/table.php?distribution=fatdog

as a live product system rescue cd (used as usb) also good
https://distrowatch.com/table.php?distribution=systemrescue

Long before Ubuntu (and relations) were even a thought I was using pre-8086 systems.
Then after the PC was invented & spread about somewhat I moved to DOS.
I was (after a while...) exposed to - but not inspired - by this other DOS-like thing called Unix, then later to Linux.
Played with it on & off for years myself before it became docile enough for technophobes to use it.
And yes=>
I've enjoyed using the Puppies, etc., and have many liveboot medias on hand.

Sadly - none of that solved my recent problems of working with NTFS stored files in converting all to EXT3 - resolving perms & ownership between the file systems is a genuine PITA.
Worst of all (IMO) is when things look like they are all set - but aren't.

So gentle members of this UM forum - I knew I was dealing with an Ubuntu centered problem that really needed a full root login once in a while until I've completed fulfilling my own various needs, then I can easily disable it again anytime.

This made me giggle, thanks:

Do you know what these mean?
sudo su
su -
su

I actually have lists of all the various chown & perm things that SHOULD have worked - but did not - and this is obviously because of having some NTFS involved, for which there is no really simple solution that I have yet found.

My query is directed towards getting a specific list type of things to go from the 'norm' of a user-centric Ubuntu locked away from full root access to being able to just type in root & PW at log in as needed.

IMO, this should NOT trigger liability or warning flags much the same as the Firefox 'I'll be careful, I promise !' thing.
After all - this is MY PC & if I screw it up badly enough it will be up to me to reinstall my chosen OS - so, be it upon my head to properly use the info if/when it is finally time for folks to quit trying to frighten me away from it.

I have a nicely 'canned' configuration on a USB boot media which can reinstall a partially tweaked (to my specs) OS in under 15 minutes, this is NOT a life vs. death scenario !!
Thanks.

Hi

well I may be wrong.....but if the real reason you need this root access is to access
windows partitions have you considered running UM as a host and put W10 etc into a virtual machine.

I shall no longer respond in the hope someone with more gentle ways can help you.

I do use UM as host & windoze as guest AND also need stronger access to literally copy the VM files from the NTFS partition they are on, over to an EXT3 partition from which they will be used - with the owner as USER such that a normal log-in will suffice.

As said before - this is a step in a process rather than a permanent condition for daily uses.

It should not be a huge problem with hidden values when someone wants root access to their own system - it is their choice.
If they ruin their OS thereby, then it is for them to learn from.

Well, to cut to the chase... and you're certain of the risks, here's a slightly different approach which will auto login into a graphical root session in a console:

  1. Disable the login manager

    sudo bash
    systemctl disable lightdm.service
    
  2. Use tty1 as primary console, edit /etc/systemd/logind.conf and change #NAutoVTs=6 to NAutoVTs=1, or use this command:

    sed -i 's/#NAutoVTs=6/NAutoVTs=1/g' /etc/systemd/logind.conf
    
  3. Make tty1 auto login as root

    systemctl edit getty@tty1
    

    Paste these lines:

    [Service]
    ExecStart=
    ExecStart=-/sbin/agetty --autologin root --noclear %I 38400 linux
    

    Save and enable this new service

    systemctl enable [email protected]
    
  4. Make the root user auto start the X server as soon as it logs in

    echo "startx" >> /root/.profile
    

Then reboot, confirmed working on 18.04, but this is destructive as I wasn't able to easily revert these steps and re-enable lightdm afterwards! :warning:

After rebooting, if you want sound, add pulseaudio to Start-up Applications. There could be other little gotcha's, like Caja not always starting.

:bulb: It is possible to just perform step 3, so you can press CTRL + ALT + F1 to switch to "root". Typing startx to start the GUI. That'll retain CTRL + ALT + F7 for the "normal" logins.

Source for part of the answer

https://unix.stackexchange.com/a/401798

1 Like

Thanks for your (rather scary !!) reply LAH7.

Seeing how that method includes the word 'destructive' is more than a wee bit discouraging IMO.

My very firm POV is that owners of PCs should have the unhindered option to make their own mistakes rather than being 'protected from themselves' as what the lobotomized windoze world has started doing in recent years.

All that having been said - I re-did my listed steps on a 2nd installation, and guess what ??

Now I can just type in root for the username, then the PW - and all is working except for desktop icons & sounds, which I can do without for the very short times I need that access for.

Therefore I'm guessing that my quest in this exact matter is fulfilled for now - but my wish for an easier, more direct path to this goal remains !!

Thanks for the replies & efforts Folks.

Hello, I had the same problem and found this:

Change /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf with /usr/share/lightdm/lightdm.conf.d/50-ubuntu-mate.conf and add greeter-show-manual-login=true

1 Like