Public bug reported:
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)
** Affects: shadow (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1822501
Title:
chpasswd mishandles --root option
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/shadow/+bug/1822501/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs