I am running Ubuntu 16.04.2 LTS on an iMac. I am the administrator of six users, and none of them can login with a password. Only the administrators with sudo privs can use a password. When you try to change the password through Settings > Users and Groups, it successfully changes the password, but when you log out and try to log in again, it doesn't ask for a password and just logs in when you click the user name. This is also the case when I use the passwd command through the terminal.

user@ubuntu-imac:~$ passwd
Changing password for user.
(current) UNIX password: 
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully

How do I fix this?

  • Are the users in the nopasswdlogin group (getent group nopasswdlogin)? – steeldriver Jun 16 '17 at 0:59
  • @steeldriver I just checked. Everybody is in that group. Can you please post the solution as an answer? – Curtice Gough Jun 16 '17 at 1:02
  • Are your users in the group nopasswdlogin? – jones0610 Jun 16 '17 at 1:02
  • @steeldriver you beat me by 45 seconds :) – jones0610 Jun 16 '17 at 1:03

The lightdm GUI display manager allows users to login without providing their UNIX account password if they are members of the nopasswdlogin group.

You can check which users are members of the group using getent e.g.

getent group nopasswdlogin

You can remove users from the group a number of ways - IMHO the gpasswd utility is the most straightforward e.g.

sudo gpasswd --delete carol nopasswdlogin

Alternatively, set the group membership to s specific list of allowed users using the -M (--members) switch:

sudo gpasswd --members alice,bob nopasswdlogin

You can remove all users from the group (thereby requiring all users to supply their UNIX passwords for GUI login) by setting the group membership to an empty list i.e.

sudo gpasswd -M '' nopasswdlogin

See man gpasswd.

  • Thank you! That worked perfectly. Just as a side note, I found out that you can also use the deluser command to remove a user from a group. – Curtice Gough Jun 16 '17 at 11:29

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.