Having another Linux system mounted on /sys2
.
AFAIK passwords are stored there in second file of /sys2/etc/shadow
file.
I'd like to set new password there. How to generate hash, which I can put there into second filed of desired row?
Btw. Is there nowadays one standard way of hashing passwords across Linux systems? I've checked on my three setups with different distributions and for same passwords I have same hashes.
P.S.
passwd -R /sys2
- option-R
does not do the job for me. I do not have all mounts for chrooting. And system I mount is arm, and I mount it on x86.passwd -r ...
- I couldn't figure out how to use-r repository
option to work for me.
passwd
supports-R CHROOT
to edit the password in a different location - but it looks likeadduser
doesn't provide that mechanism. – Popup Oct 09 '23 at 09:29