centos set root password-free automatic login

Modify the /etc/gdm/custom.conf file to realize automatic login of root user without password

1. Use the root user to log in
2. Open the terminal command window and open the configuration file with vi editor, command:vi /etc/gdm/custom.conf

3. Add under [daemon]:

AutomaticLoginEnable=True

AutomaticLogin=root

Save the file and restart to see the effect.

Vi editor operation file method:

Enter edit mode, press o to edit

After editing, press the ESC key to jump to the command mode , and then enter the exit command:

:w save the file without exiting vi editor

:w! Forced to save without exiting vi editor

:w file Save the modification to file without exiting vi editing

:wq save the file and exit vi editor

:wq! Force to save the file and exit vi editor

q: Do not save the file and exit vi editor

:q! Do not save the file and force quit vi editing

:e! Discard all modifications and start editing from the last saved file

Guess you like

Origin blog.csdn.net/qq_41320433/article/details/126606724