migrating /etc/passwd (and shadow) between machines: why should it work?
So apparently it's possible to copy entries from the /etc/passwd and /etc/shadow from one machine to another, and it 'just works'. My question is, why? According to the shadow(5) manpage, the passwords are encrypted via the crypto function which takes a salt. Do all distros use the same salt? Otherwise I don't see how this is possible.
|
The salt is part of the shadow entry. The entry is broken down as:
Code:
struct spwd { single_digit signifying the method of encryption salt encrypted password HTH Forrest |
awesome, I can reproduce the hash in my /etc/shadow by using the salt "$1$abcdefgh" for crypt(). What other encryption methods are there besides md5 and des? my man crypt doesn't mention anything else.
|
Here is what my man says about it:
Code:
NOTES Forrest p.s. So, I guess the ID isn't limited to one char I've just only ever seen one. |
All times are GMT -5. The time now is 10:03 AM. |