Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chpasswd using different format in shadow than passwd #145

Open
mika opened this issue Nov 27, 2019 · 1 comment
Open

chpasswd using different format in shadow than passwd #145

mika opened this issue Nov 27, 2019 · 1 comment

Comments

@mika
Copy link
Member

mika commented Nov 27, 2019

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.

@fransvanberckel
Copy link

fransvanberckel commented Aug 3, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants