LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 11-23-2010, 05:03 PM   #1
davidstvz
Member
 
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.

EDIT

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 05:17 PM.
 
Old 11-23-2010, 05:43 PM   #2
davidstvz
Member
 
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"

http://forums.gentoo.org/viewtopic-t-134503.html
 
  


Reply



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 11:01 AM
give password with command /usr/sbin/passwd jonaskellens Linux - Newbie 8 09-25-2009 08:34 AM
passwd command says BAD PASSWORD planetmars Linux - Newbie 9 09-19-2009 04:42 AM
passwd command modifies /etc/password? pantuflo Linux - Newbie 1 08-06-2009 12:18 PM
changing password of a user without using passwd command anerudhbalaji Linux - Software 2 05-22-2009 02:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:24 AM.

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
Open Source Consulting | Domain Registration