LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-01-2011, 07:53 AM   #1
tom345
LQ Newbie
 
Registered: Mar 2011
Posts: 2

Rep: Reputation: 0
Getting access denied when "user must change password at next logon" is checked .


I have got a RHEL 5.6 server configured to authenticate via a Windows 2008 domain controller via LDAPS. Everything is working fine, except from the following:

When I create a new user in Active directory and check the option "user must change password at next logon", the new user cannot logon and gets an "access denied" message.

In /var/log/secure, I find the following:

Mar 1 14:43:21 cpssvn10 sshd[5363]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.3.12 user=testuser2
Mar 1 14:43:21 cpssvn10 sshd[5363]: pam_ldap: error trying to bind as user "CN=CPSS Testuser 2,OU=IBM,DC=cpss,DC=smarterplatform,DC=com" (Invalid credentials)
Mar 1 14:43:23 cpssvn10 sshd[5363]: Failed password for testuser2 from 192.168.3.12 port 4583 ssh2

As soon as I uncheck the "user must change ..." option, the user can log on without problems. Also password change via the passwd command works.

The security guidelines of my company require that a new user must change his password. What can I do?
 
Old 03-02-2011, 04:41 AM   #2
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
Does pam know that it must contact the ldap-server to change the password (at time of login, later on it’s working obviously)? This can be in the module auth in pam, while changing it later would be in module password (where it’s working).
 
Old 03-02-2011, 05:12 AM   #3
tom345
LQ Newbie
 
Registered: Mar 2011
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for your reply. This is my system-auth file:

#%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_localuser.so
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
password sufficient pam_unix.so remember=7 md5 shadow 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 optional pam_mkhomedir.so umask=0077
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

I would not know, how to tell pam that it must contact ldap for password change. I am not a pam specialist at all. I have tried to append use_authtok to the line "auth sufficient pam_ldap.so use_first_pass", but it did not help.
 
  


Reply


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
[SOLVED] "Access denied" error when "./configure" Cassanova Linux - Software 6 09-21-2010 12:18 AM
seeking change to "keyring" password and access SaintDanBert Linux - Software 4 04-10-2010 12:42 PM
squid "access.log" access denied no user name jatender Linux - Server 1 10-02-2007 04:28 AM
Need ACCESS to change files! Every time I try to change a setting,"Permission Denied" Balarabay1 SUSE / openSUSE 2 03-06-2006 09:54 AM
why I got "Access denied for user: 'root@localhost'" likedreamer Red Hat 1 11-09-2003 05:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:09 PM.

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