Linux uses MD5 encryption for passwords. when we check it using passwd -S thats what we get. Now what I did was create a new user and using the useradd -p option specified the password which was an exact copy of a password in the shadow file. But this time passwd -S shows the encryption as DES. How come?????
AFAIK, Linux uses DES for encryption, and the useradd -p expects the result of calling crypt(...) that works with the DES algorithm...
If you run the passwd -S command for a user that has a password. You get a message saying that the password exists and is MD5 encrypted.
useradd -p does require an encrypted password. I copied an encrypted password from the shadow file and put it as the argument.