I have setup the sever to only use LDAP for authentication by using authconfig-tui. Everything works well but, when I run passwd, I get two prompts for a password:
[beamin@rhel6-test-server1 ~]$ passwd
Changing password for user beamin.
Changing password for beamin.
(current) UNIX password:
Enter login(LDAP) password:
Why is it asking for both? Can I prevent that from happening?
Edit #1:
Here is the content of /etc/pam.d/passwd:
$ cat /etc/pam.d/passwd
#%PAM-1.0
auth include system-auth
account include system-auth
password substack system-auth
-password optional pam_gnome_keyring.so
Here is the content of the include (/etc/pam.d/system.auth):
$ cat /etc/pam.d/system-auth
#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth required pam_env.so
auth sufficient pam_unix.so nullok try_first_pass
auth requisite pam_succeed_if.so uid >= 500 quiet
auth sufficient pam_ldap.so use_first_pass
auth required pam_deny.so
account required pam_unix.so broken_shadow
account sufficient pam_succeed_if.so uid < 500 quiet
account [default=bad success=ok user_unknown=ignore] pam_ldap.so
account required pam_permit.so
password requisite pam_cracklib.so try_first_pass retry=3 type=
password sufficient pam_unix.so nullok try_first_pass use_authtok
password sufficient pam_ldap.so use_authtok
password required pam_deny.so
session optional pam_keyinit.so revoke
session required pam_limits.so
session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
session required pam_unix.so
session optional pam_ldap.so
Edit #2:
Contents of nsswitch.conf asked by @Nikhil:
$ egrep 'passwd|shadow' /etc/nsswitch.conf
#passwd: db files nisplus nis
#shadow: db files nisplus nis
passwd: files
shadow: files
/etc/pam.d/passwdcontain, as well as any file it@includes? – Gilles Dec 8 '11 at 19:57/etc/pam.d/passwd. I wantpasswdnot to prompt for the UNIX password. I will paste the switches from/etc/nsswitch.conf. – Beaming Mel-Bin Dec 8 '11 at 20:31/etc/pam.d/system.authdoes the trick. Does anyone see any unforeseen circumstances when doing that? Put it in an answer please so I could award accordingly :-) – Beaming Mel-Bin Dec 8 '11 at 21:02