Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passwd: Module is unknown 2

Status
Not open for further replies.

cpjust

Programmer
Sep 23, 2003
2,132
US
If I add a user or try to change a password with passwd I get this error:
Code:
passwd: Module is unknown
passwd: password unchanged
I don't understand. I see this:
Code:
# which passwd
/usr/bin/passwd
The user gets added to /etc/passwd, but they can't login since their password was never set.

Are there some libraries I need to install to fix this?

I'm running Ubuntu server if that makes any difference.
 
Try this to see if it's finding all of it's libraries...
Code:
ldd `which passwd`
Can you run [tt]passwd[/tt] as [tt]root[/tt]?


 
Here's the output:
Code:
# ldd `which passwd`
	linux-vdso.so.1 =>  (0x00007fffbf3fe000)
	libcrypt.so.1 => /lib/libcrypt.so.1 (0x00007f98b6f14000)
	libpam.so.0 => /lib/libpam.so.0 (0x00007f98b6d0a000)
	libpam_misc.so.0 => /lib/libpam_misc.so.0 (0x00007f98b6b07000)
	libselinux.so.1 => /lib/libselinux.so.1 (0x00007f98b68eb000)
	libc.so.6 => /lib/libc.so.6 (0x00007f98b6589000)
	libdl.so.2 => /lib/libdl.so.2 (0x00007f98b6385000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f98b714c000

I wonder if something in the LDAP configuration disabled the local passwd? When I try to change my password as root I get:
Code:
Enter login(LDAP) password:
and it doesn't accept the local root password.
 
In that case, can you also paste the contents of the @included file please?

Annihilannic.
 
Sure, here's /etc/pam.d/common-password
Code:
password   required     pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3
password   sufficient   pam_unix.so nullok md5 shadow use_authtok
password   sufficient   pam_ldap.so use_first_pass
password   required     pam_deny.so
 
BTW, I found these files:
/lib/security/pam_deny.so
/lib/security/pam_ldap.so
/lib/security/pam_unix.so

but I couldn't find pam_cracklib.so anywhere on that system.
 
Odd... which Linux distribution is this?

On the RHEL4, RHEL5 and SLES9 distributions I've just checked pam_cracklib.so seems to be part of the pam or pam-32bit RPM packages.

As a temporary workaround you can comment out the entry referring to pam_cracklib.so; it's purpose is to make sure that passwords are sufficiently complex to avoid easy guessing by would-be intruders.

Annihilannic.
 
It's Ubuntu server.

I commented out the cracklib line in common-password, but now I get this error when I try to change a password
Code:
passwd: Authentication information cannot be recovered
passwd: password unchanged
 
Are your /etc/passwd and /etc/shadow files apparently intact?

I'd be suspicious in your circumstances. It might be worth checking for a rootkit, if there is some means by which the server could have been attacked. It's not a situation I've been in so I can't really offer more advice about that.

Annihilannic.
 
Edit the file /etc/pam.d/common-password and remove the use_authtok directive from the pam_unix.so line, as well as comment out the pam_cracklib.so line.

This will get your system working. Then you should tune it as you go.

Code:
#password   required     pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3
password   sufficient   pam_unix.so nullok md5 shadow #use_authtok
password   sufficient   pam_ldap.so use_first_pass
password   required     pam_deny.so
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top