← Back to team overview

dx-packages team mailing list archive

[Bug 1302230] Re: error in accountsservice/user.c fails to remove user from nopasswdlogin when mode is set to none

 

Thank you for the reply. I agree that the line is in fact correct. I see
I mistakenly thought the mode had already changed, but that is not done
until after exiting the current block.

But here is how the bug is working:

Setting the mode to none causes the user to be added to the
nopasswdlogin group.

Adding a password (user_change_password_authorized_cb) includes code to
remove the user from the nopasswdlogin group.

But If mode has already been set to none when the user is locked, the
user will not be removed from the nopasswdlogin group.

This is confirmed in /var/log/auth.log.

Locking the account in user_change_locked_authorized_cb (line 2435)
should -- but does not -- check the mode.

If the current mode is none, it needs to change the mode to something
else, which in turn will remove the user from nopasswdlogin.

-- 
You received this bug notification because you are a member of DX
Packages, which is subscribed to accountsservice in Ubuntu.
Matching subscriptions: dx-packages
https://bugs.launchpad.net/bugs/1302230

Title:
  error in accountsservice/user.c fails to remove user from
  nopasswdlogin when mode is set to none

Status in “accountsservice” package in Ubuntu:
  Confirmed

Bug description:
                  /* Remember to remove user from nopasswdlogin group if we're
                     switching away from no-password mode */
  2683                if (user->password_mode == PASSWORD_MODE_NONE) {
                          argv[0] = "/usr/bin/gpasswd";
                          argv[1] = "-d";
                          argv[2] = user->user_name;
                          argv[3] = "nopasswdlogin";
                          argv[4] = NULL;

  Line 2683 should be  if (user->password_mode != PASSWORD_MODE_NONE) {

  See related:
  https://bugs.launchpad.net/ubuntu/+source/accountsservice/+bug/1169054

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/accountsservice/+bug/1302230/+subscriptions