I want to copy a few user accounts to a new system… is there a more elegant way to copy /etc/shadow passwords other than editing the file?
for instance, is there some way I can give the password hash to
/usr/bin/passwd ?
2 thoughts on - Copying User Accounts…
I’ve used “usermod -p ” successfully many times.
Just be careful with escaping of the ‘$’ field separators that appear in the encrypted password string from /etc/shadow.
+1
A while back I wrote a script to migrate accounts and data for a home system. Matt G. hit the major gotchas with escaping dollar signs.
2 thoughts on - Copying User Accounts…
I’ve used “usermod -p ” successfully many times.
Just be careful with escaping of the ‘$’ field separators that appear in the encrypted password string from /etc/shadow.
+1
A while back I wrote a script to migrate accounts and data for a home system. Matt G. hit the major gotchas with escaping dollar signs.