Enable Root User Login
Ctrl + Alt + t Enter the terminal, enter cd /usr/share/lightm/ightm.conf.d
, if you are prompted to do not have that file or directory. Then go into the catalogue again and again.
Several files that you will see after you enter.
Write a picture description here
Enter the command to vi 50-unity-greeter.conf
add:
greeter-show-manual-login=true
allow-guest=false
At this point, you can log in with the root user, enter the username root, and the root user's password to login. If you do not want to enable root user login, then greeter-show-manual-login=true
change the true to false.
Avoid entering a password to log in directly
Root User login is enabled above. Now, if you are logged in, you are not prompted to enter your account password.
Enter the terminal input cd /etc/lightdm
after entering the directory, input the vi lightdm.conf
file for editing, paste the following statement:
[Seat:*]
autologin-guest=false
autologin-user=root
autologin-user-timeout=0
autologin-user=root
This is where you set up a username that requires a password-free login, or it can be set to a non-root user.
This can also be done in a graphical interface. Steps: System Settings-user account--turn on automatic login
Off topic:
With the above settings, we will set the root user to the default login account, although the default root login is enabled, but it is not recommended to log in as the default user for the root user. When you need to use root privileges, you can add the command before sudo
, or enter su
or su root
or sudo -i
temporarily switch to root login in the terminal before entering the command.
I ubuntu version: 15.10
Reference: http://www.ubuntukylin.com/ukylin/forum.php?mod=viewthread&tid=8445
Go Ubuntu defaults to login with the root user and avoids entering the password