LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-25-2010, 08:56 PM   #1
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,027

Rep: Reputation: 69
How do I change the password types...


This is concerning the normal login password at command line by changing via the 'passwd' command. Is there a way to change the type of passwords used? For example, the majority of linux distros use MD5. In Slackware or Centos, where would I change the security setting to go from MD5 to DES or some other encryption?
 
Old 06-25-2010, 11:07 PM   #2
myposts
Member
 
Registered: Jun 2010
Posts: 46

Rep: Reputation: 21
1. you confuse encryption algorithms with signature
2. to configure your authentication procedures use Pluggable Authentication Module (PAM), there's too much to type, so google it
3. take a look on UNIX Academy unixacademy.com there was a paper with good explanation of it
 
Old 06-27-2010, 12:49 AM   #3
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,027

Original Poster
Rep: Reputation: 69
Slackware does not have PAM. Any other methods?
 
Old 06-27-2010, 02:30 AM   #4
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 376Reputation: 376Reputation: 376Reputation: 376
Quote:
Originally Posted by trist007 View Post
This is concerning the normal login password at command line by changing via the 'passwd' command. Is there a way to change the type of passwords used? For example, the majority of linux distros use MD5. In Slackware or Centos, where would I change the security setting to go from MD5 to DES or some other encryption?
Change the ENCRYPT_METHOD variable in the /etc/login.defs file. The change will only affect new passwords, but you can force a user to set a new password (so that his/her /etc/shadow file entry is re-created using the new hash algorithm) by expiring it, like (example):
Code:
passwd -e trist007
This way, the user will be required to set a new password next time he/she logs in.

Last edited by win32sux; 06-27-2010 at 03:10 AM.
 
Old 06-27-2010, 09:26 AM   #5
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,027

Original Poster
Rep: Reputation: 69
Awesome win32sux. Thanks soo much. Found the section in the /etc/login.defs

ENCRYPT_METHOD (string)
This defines the system default encryption algorithm for encrypting passwords (if no algorithm are specified on the command line).

It can take one of these values:

DES (default)
MD5
SHA256
SHA512

Note: this parameter overrides the MD5_CRYPT_ENAB variable.
Note: if you use PAM, it is recommended to set this variable consistently with the PAM modules configuration.
 
Old 06-27-2010, 08:29 PM   #6
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 376Reputation: 376Reputation: 376Reputation: 376
Quote:
Originally Posted by trist007 View Post
Awesome win32sux. Thanks soo much.
You're welcome.

BTW, remember to inspect your /etc/shadow file to confirm the change has taken effect. For example, if you switched to SHA512, the hash type indicator (located at the beginning of the password field) should read $6$ on newly created accounts (or changed passwords).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Change Drive Types ... d00dness Linux - General 1 03-18-2009 10:51 AM
Change my root password in Debian Linux if I have the current password? panseluta Linux - Newbie 2 12-28-2008 03:02 AM
how to change session types list lordmyth SUSE / openSUSE 1 02-20-2005 03:09 AM
How can I change e-mail password(or linux account password) with php in website?? yusuf Programming 1 05-28-2004 10:39 AM


All times are GMT -5. The time now is 12:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration