I'm running an Ubuntu 16.04 machine on QEMU/KVM. I created a new user, atww, using Settings/User Accounts on the VM. The user account type is Administrator. I used usermod -p atww atww to set the password of user atww to atww. When I try logging in with atww and password atww I get "Invalid password, please try again" passwd -aS | grep atww gives atww P 01/09/2018 0 99999 7 -1 which seems to be correct. Is it ? Please help ! Many thanks, Arno

  • Try using passwd to set the user password – Charles Green Jan 9 '18 at 16:09

The key -p for usermod command indicates to update the user's password with its encrypted value. https://linux.die.net/man/8/usermod

-p, --password PASSWORD

The encrypted password, as returned by crypt(3).

Note: This option is not recommended because the password (or encrypted password) will be visible by users listing the processes.

You should make sure the password respects the system's password policy.

The solution is to use passwd username.

  • Thank you so much ! I used passwd as you suggested and got the problem solved. – ArnoVersfeld Jan 11 '18 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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