Operating System - Linux
1829651 Members
8400 Online
109992 Solutions
New Discussion

Hotw to change encryption method from MD5 to DES in linux

 
Kaps_2
Regular Advisor

Hotw to change encryption method from MD5 to DES in linux

Hello All,

I want to change the passwd encryption method from MD5 to DES in linux as my NIS Server is on linux and there are some NIS clients on HP-UX & AIX.so what changes i need to do on the linux server...?

Thanks,
Kaps
3 REPLIES 3
Matti_Kurkela
Honored Contributor

Re: Hotw to change encryption method from MD5 to DES in linux

Your distribution might have some menu-driven tools for doing this easily. For RedHat, I believe the command is "system-config-auth" or something similar. For SuSE, the option should be available somewhere in the yast menus.

All these distribution-specific tools will eventually do the same thing: they will edit the files in /etc/pam.d. Within those files, there are references to various PAM modules. The standard module is pam_unix.so. It takes the option "md5". If that option is specified, the system uses MD5 password hashing algorithm; if not, the system uses the traditional DES-based algorithm.

If you make the change manually, you should first remove the "md5" option from the "password" PAM category only. Then re-set all local passwords using the "passwd" or "chpasswd" commands (the latter is suited for bulk password setting). Verify that all the passwords have been changed to the DES form, then remove the "md5" option from the "auth" PAM category.

If you're planning to change any PAM settings manually, open at least two terminal windows with root access *before* making the change. After the change, don't close the two windows, and open a third terminal window to make sure you can still access the system and become root.

Any PAM setting changes will take effect immediately, and it's too easy to accidentally lock yourself out of the system by mistake. With this procedure, if you made a mistake, you still have two windows you can use to undo your changes.

MK
MK
Kaps_2
Regular Advisor

Re: Hotw to change encryption method from MD5 to DES in linux

how do I verify that the passwd are changed from MD5 to DES...?
Matti_Kurkela
Honored Contributor

Re: Hotw to change encryption method from MD5 to DES in linux

A MD5-encrypted password string always has "$1$" in the beginning and is always more than 24 characters long.

A DES-encrypted password does not have any identifier, and the encrypted string is shorter.

MK
MK