-4

I was wondering if you could login as root, not through the terminal, but rather like you would if you made a normal user.

1 Answers1

0

I have tried and it worked on Ubuntu 22.04.


Try this

#set root password
sudo passwd root

sudo vim /etc/pam.d/gdm-autologin ##Annotate this line #auth requied pam_succeed_if.so user != root quiet success

sudo vim /etc/pam.d/gdm-password ##Annotate this line #auth requied pam_succeed_if.so user != root quiet success

vim /root/.profile

  • mesg n 2> /dev/null || true
  • tty -s && mesg n || true

Then reboot


It's true that working directly under the root user is dangerous. It is more recommended to use sudo

Jason Lee
  • 37
  • 6