« Return to Thread: passwd: "user" not found in /etc/passwd

Re: passwd: "user" not found in /etc/passwd

by yp_ :: Rate this Message:

Reply to Author | View in Thread


Dargx wrote:
Hi all

I've several machines running ldap authentication without problems.
But I've been trying to set up another one since 2 days ago using the latest versions of pam_ldap and nss_ldap. The SO is Linux kernel 2.6.20. pam_ldap version: 184. nss_ldap version: 255. Openldap version: 2.2.26

Authentication works fine but I'm not able to change passwords. The exact error is:
 [root@host /]# passwd "user"
 Changing password for "user"
 Enter the new password (minimum of 5, maximum of 8 characters)
 Please use a combination of upper and lower case letters and numbers.
 New password: ******
 Re-enter new password: ******
 passwd: "user" not found in /etc/passwd

However that "user" can log in via ldap.


I'll copy & paste some configurations.

/etc/nsswitch.conf:

 passwd:      files ldap
 group:       files
 shadow:      files ldap
 ..............  ................

/etc/pam.conf

#%PAM-1.0
# --------------------------------------------------
su      auth            sufficient      pam_rootok.so
su      auth            required        pam_unix_auth.so
# --------------------------------------------------
login   auth            requisite       pam_securetty.so
login   auth            sufficient      pam_unix.so
login   auth            required        pam_ldap.so
# --------------------------------------------------
other   auth            sufficient      pam_ldap.so
other   auth            required        pam_unix.so
other   account         required        pam_unix.so
other   password        required        pam_warn.so

other   password        sufficient      pam_ldap.so
other   password        required        pam_unix.so

Try to replace the previous 2 lines like this:

other   password        sufficient      pam_unix.so
other   password        required        pam_ldap.so ignore_unknown_user



other   session         optional        pam_lastlog.so
other   session         required        pam_unix.so


Please, any suggestion will be more than welcome.
Thanks a lot in advance.

Regards

 « Return to Thread: passwd: "user" not found in /etc/passwd

LightInTheBox - Buy quality products at wholesale price