I decided to "scratch my own itch" and submitted a PR upstream.

https://github.com/shadow-maint/shadow/issues/219


** Bug watch added: github.com/shadow-maint/shadow/issues #219
   https://github.com/shadow-maint/shadow/issues/219

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to shadow in Ubuntu.
https://bugs.launchpad.net/bugs/1822501

Title:
  chpasswd mishandles --root option

Status in shadow package in Ubuntu:
  New

Bug description:
  I did

    echo root:secret | chpasswd --root=/mnt/img

  I expected the password to be changed on the mounted filesystem at /mnt/img
  Instead, it changed the password on the host filesystem.

  Although the chpasswd(1) manual page does not list --root=CHROOT_DIR
  as valid syntax, it is common for programs to accept both --arg param
  and --arg=param as valid syntax (as per gnu getopt_long).  At the very
  least, chpasswd should fail with an error report if unacceptable
  option syntax is used, rather than ignoring it.

  passwd 1:4.5-1ubuntu1 on Ubuntu 18.04.2 LTS

  (though bug tracker seems to think this does not exist in Ubuntu)

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

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to