Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-23-2010, 06:03 PM   #1
Registered: Jun 2008
Posts: 405

Rep: Reputation: 31
passwd command doesn't recognize valid password

I migrated an old SuseLinux 10 box to Debian (Lenny) a couple months ago, and apparently no one noticed you can't change your password. Root can do it because passwd doesn't ask root for a password, but no one else can (although they can log in, passwd doesn't recognize their login password when they attempt to set a new password and it asks).

I changed authentication to use blowfish when I setup the server (because the SuseLinux 10 system used it) and apparently the passwd command doesn't work with that. Apparently I need to update another configuration file or possibly get a different program to update the passwd file if I use blowfish. Any ideas?

The weird thing is that it can generate a blowfish hash to set a new password, but apparently can't generate one to authenticate the user.


Ok, I take it back... something changed recently and it is no longer generating a blowfish hash when setting a new password. It is generating a hash with only 13 characters. And I can clearly see that many users have changed their passwords. Here's how the shadow file looks:

accounts ported from old system: blowfish
accounts automatically generated on this system: md5
accounts among these where the user changed their password: blowfish
new accounts I made manually in the last few weeks, 13 char hash

Not sure what I changed to cause this.

Last edited by davidstvz; 11-23-2010 at 06:17 PM.
Old 11-23-2010, 06:43 PM   #2
Registered: Jun 2008
Posts: 405

Original Poster
Rep: Reputation: 31
Ok, I'm not sure how it happened, but apparently I changed /etc/pam.d/common-passwd at some point in the last few weeks so that the line specifying encryption was changed from pam_unix2 to pam_unix breaking the passwd command. I find the following advice at this link:

"Okay, the final solition is to emerge pam_unix2 and then replace all instances of "pam_unix" with "pam_unix2" in /etc/pam.d/* files and "md5" with "blowfish" in /etc/pam.d/system-auth"


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
trying to change root password with the passwd command he04798 Red Hat 5 01-17-2010 12:01 PM
give password with command /usr/sbin/passwd jonaskellens Linux - Newbie 8 09-25-2009 09:34 AM
passwd command says BAD PASSWORD planetmars Linux - Newbie 9 09-19-2009 05:42 AM
passwd command modifies /etc/password? pantuflo Linux - Newbie 1 08-06-2009 01:18 PM
changing password of a user without using passwd command anerudhbalaji Linux - Software 2 05-22-2009 03:10 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:23 PM.

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