Comment 5 for bug 238755

Revision history for this message
Nicolas François (nekral-lists) wrote : Re: 'Account has expired' message when adding a new user

I don't think there is a bug. This looks like a configuration issue.

When it is called, chfn authenticates the calling user (root), and then check if the calling user's is valid.

Being root is sufficient to get authenticated (pam_rootok is loaded in /etc/pam.d/chfn), but /etc/pam.d/comman-account will still check that the account is valid, and in your case it is no more valid (because of the passwd -l root)

You should unlock the root account (passwd --unlock root), then lock the root's password (usermod --lock root)