Re: Password Encryption

 
SOLVED
Go to solution
Helmuth Viets
New Member

Password Encryption

Hi,

ist there information available concerning the encryption of the standard password setting?

Thanks in Advance
Education Consulting
6 REPLIES 6
Christopher Caldwell
Honored Contributor

Re: Password Encryption

$man 3 crypt
Sridhar Bhaskarla
Honored Contributor
Solution

Re: Password Encryption

crypt and a handy tool /usr/lbin/makekey. If you want to generate an encrypted password, you can use

mypasswd2x|/usr/lbin/makekey

Put the output of the above in the password field of /etc/passwd and your password will be mypasswd.

the last 2 characters in this 10 char input together is called salt. man makekey for more details.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor

Re: Password Encryption

...correction..

echo mypasswd2x|/usr/lbin/makekey

...
You may be disappointed if you fail, but you are doomed if you don't try
Darrell Allen
Honored Contributor

Re: Password Encryption

makekey will return the same 13 character string as found in the encrypted password field in /etc/password providing the same salt and password are used. If the password is more than 8 characters, only the first 8 characters are used for the encryption. If the password is less than 8 characters, you need to pad the password with enough "nulls" to make the length 8 characters.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Darrell Allen
Honored Contributor

Re: Password Encryption

I should have included an example with null character padding of a password that is less than 8 characters...

echo "testing\000Ct" | /usr/lbin/makekey

In this example, the 7 character password is "testing". I padded the password with 1 null character "\000" and specified "Ct" as the salt.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Helmuth Viets
New Member

Re: Password Encryption

Hello

Thanks to everybody who answered. My question/problem ist completely solved.

Helmuth
Education Consulting