[Bug 1584945] Re: after reset password in /etc/passwd and set a new one, hash appears in /etc/passwd

Seth Arnold 1584945 at bugs.launchpad.net
Tue May 24 07:12:37 UTC 2016

A co-worker has reminded me that the 'x' in the passwd file is how the
shadow suite annotates that the password should be stored in the shadow

       password field is blank. If the password field is a
       lower-case “x”, then the encrypted password is actually
       stored in the shadow(5) file instead; there must be a
       corresponding line in the /etc/shadow file, or else the user
       account is invalid. If the password field is any other

(from passwd(5))

Once the 'x' was removed, that was the indicator that the password
should be stored in the passwd file instead of the shadow file.

So this is behaving as expected.


** Changed in: base-passwd (Ubuntu)
       Status: New => Invalid

** Information type changed from Private Security to Public Security

You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to base-passwd in Ubuntu.

  after reset password in /etc/passwd and set a new one, hash appears in

Status in base-passwd package in Ubuntu:

Bug description:
  After resetting a password in /etc/passwd (and /etc/shadow) and setting a new one, its hash appears in /etc/passwd.
  I forgot my pass :( and launched liveUSB with Ubuntu 16.04.
  1st time I just used vi to edit /etc/passwd and remove "x" char in 2nd column.
  Reboot and I can change (maybe set) pass the usual way "passwd" etc.
  But password's hash appears in /etc/passwd.
  So strange.

  2nd time I used "vipw" and "vipw -s" to clean the 2nd column.
  Reboot. And I can set NEW password.
  Password's hash appears in passwd and does not appear in shadow.

  I use Ubuntu 16.04 with latest update.

  anonym at ubu:~$ tail -1 /etc/passwd
  anonym at ubu:~$ sudo tail -1 /etc/shadow
  [sudo] пароль для anonym: 
  anonym at ubu:~$ cat /etc/lsb-release 
  anonym at ubu:~$

To manage notifications about this bug go to:

More information about the foundations-bugs mailing list