How to enable automatic user logins in CentOS 7 and GNOME

CentOS-LogoIf 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:

  1. Login to GNOME as usual
  2. Find your name at the top right and click on it
  3. Now select Settings
  4. In the new window that opens, find Users
  5. Click on Unlock at the top right
  6. 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.

Screen Shot 2015-08-13 at 10.19.12

Thank you, CentOS!

Jay is the CEO and founder of WP Hosting, a boutique style managed WordPress hosting and support service. He has been working with Plesk since version 9 and is a qualified Parallels Automation Professional. In his spare time he likes to develop iOS apps and WordPress plugins, or draw on tablet devices. He blogs about his coding journey at http://wpguru.co.uk and http://pinkstone.co.uk.

12 thoughts on “How to enable automatic user logins in CentOS 7 and GNOME

  1. I can’t get this to work. What is the command to launch the user/account UI? Is there another way to do this via systemd?
    I’ve tried editing /etc/gdm/custom.conf and it doesn’t work either.

  2. Sorry, it just work once just after you boot up the system. If I logout the user, it won’t autologin again and shows me the login box !!

    1. Tja… not sure what to suggest, it works for me reliably every time. Did you speak to the CentOS people? Perhaps it’s a bug?

    2. 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

      1. 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!

  3. I dunno why people have to be so anal about autologin, Windows allows it, and obviously it trusts you know what you are doing while linux acts high and mighty and opinionated about it.

    Thing is nowadays more and more people are using linux (CentOS) in their VMs and really dont care about security when it is a friggin dev box!!

    Im glad someone posted a solution on https://www.centos.org/forums/viewtopic.php?t=5625 but this method seems to be the easiest. Thanks! Hope it works on next reboot ! Actually I will just wait until then to submit 🙂 Yes it did ! Thanks CentOS ! Thanks Sah OP !

Add your voice!