grml-debootstrap icon indicating copy to clipboard operation
grml-debootstrap copied to clipboard

chpasswd using different format in shadow than passwd

Open mika opened this issue 6 years ago • 1 comments

Quoting from IRC:

The root password for grml-debootstrap is added with $1$ to /etc/shadow (MD5?), and not $6$ (SHA256?) what passwd does.

Needs investigation whether we can do something about it.

mika avatar Nov 27 '19 06:11 mika

A walk around ...

CHPASSWD_OPTION=
if chpasswd --help 2>&1 | grep -q -- '-m,' ; then
   CHPASSWD_OPTION='--md5'
fi
if chpasswd --help 2>&1 | grep -q -- '-e,' ; then
   CHPASSWD_OPTION='--encrypted'
fi

fransvanberckel avatar Aug 03 '20 09:08 fransvanberckel