Re: New Snapshot password problem recognized
Posted: Wed Nov 02, 2022 9:14 pm
we can simulate the change that snapshot tries to do to passwords, to try to find some problem with the routine.
this short one-line script will do the simulation. we do this on the installed system with your regular user. no file or password will be changed.
while logged in as your usual user:
which should give output like this:
these are one-way hashes, so no worries about sharing them. we can't reverse engineer a password.
the first line is the original line in /etc/shadow
the second line is the hash generated for the demo account for the snapshot
the third line is the changed line, which in snapshot is the target /etc/shadow in the snapshot, not the real one, but we pretend here. again, the etc/shadow file is not modified in any way in this test, and no passwords are actually changed.
this short one-line script will do the simulation. we do this on the installed system with your regular user. no file or password will be changed.
while logged in as your usual user:
Code: Select all
user="$(whoami)"; sudo grep $user /etc/shadow; hash=$(sudo mkpasswd -m sha-512 "demo");echo "demo hash is $hash"; sudo sed -r "s=^($user):[^:]*:=\1:$hash:=" /etc/shadow |grep $user
Code: Select all
user="$(whoami)"; sudo grep $user /etc/shadow; hash=$(sudo mkpasswd -m sha-512 "demo");echo $hash; sudo sed -r "s=^($user):[^:]*:=\1:$hash:=" /etc/shadow |grep $user
dolphin:$y$j9T$XsM3CedToRpZOtVqy/c4i/$7qyhMMgtX.h4dA22vFZBrrgrrPs5rqRlhhXq31FPKq1:18936:0:99999:7:::
$6$a8SqKyQsEtW.yANz$BTF4QfOghlnAAc2y4ISHAHTX0Og1GvGIyu022a9XXxqw78pFQQg3bKbCOgYclDe/OwXJNNB5CbuY2hvKQ/dSf/
dolphin:$6$a8SqKyQsEtW.yANz$BTF4QfOghlnAAc2y4ISHAHTX0Og1GvGIyu022a9XXxqw78pFQQg3bKbCOgYclDe/OwXJNNB5CbuY2hvKQ/dSf/:18936:0:99999:7:::
the first line is the original line in /etc/shadow
the second line is the hash generated for the demo account for the snapshot
the third line is the changed line, which in snapshot is the target /etc/shadow in the snapshot, not the real one, but we pretend here. again, the etc/shadow file is not modified in any way in this test, and no passwords are actually changed.