If you’ve read my previous article about how to enable automatic logins on CentOS 6, and it sounded a little daunting, you may be pleased to hear that it’s a little easier to accomplish the same thing on CentOS 7.1.
If you’re using GNOME in a single user environment, and you’re confident that nobody else will use your system, you can enable auto-logins without the password questions like this:
- Login to GNOME as usual
- Find your name at the top right and click on it
- Now select Settings
- In the new window that opens, find Users
- Click on Unlock at the top right
- Select your own user and turn on Automatic Logins
You need supervisor privileges to make this change. Next time you restart your system, you’re logged in automatically.
Thank you, CentOS!
the issue can be fixed by restart the gdm service , but now Idon’t know how to call “service gdm restart ” after logout ,I try to udpate the /etc/gdm/PostSession/Default to call a scripts to do that ,but not work
You can only call that command when you’re logged in, either as yourself or as root (if you’re not root, you probably need to prefix this command with sudo). It’s simple: log in manually, then open a terminal shell window and type the command. TO test if it’s working, log back out and see if you’re automatically logged in.
gdm will also restart if you reboot the whole system.
Good luck!