Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to disable automatic login in Ubuntu

📅 2014-Jul-03 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ automatic login, ubuntu ⬩ 📚 Archive


I had enabled automatic login for the primary user when I installed Ubuntu. This means that the primary user still has a password, but does not need it during login or when unlocking. After using Ubuntu for a few days, I decided that the primary user needed to have normal login using password.

The typical way to disable automatic login is to go to System Settings > User Accounts. Click on the primary user, unlock the dialog and disable the Automatic Login option. I did this, but Ubuntu would still allow the primary user to login without a password.


The User Accounts dialog is not actually disabling automatic login. To disable it correctly, open the /etc/group file as sudo. Find a line that reads nopasswdlogin:x:119:joe where joe is your username. Delete this line and automatic login should be disabled now.

Tried with: Ubuntu 14.04

© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘📧