LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-10-2017, 06:44 AM   #1
Ankushkalra
Member
 
Registered: Jan 2017
Posts: 48

Rep: Reputation: Disabled
Automatically unlock LDAP user account


Hi,

I have successfully created LDAP server .

I want that LDAP users account gets automatically unlocked after 300 seconds.

LDAP user gets automatically locked after 3 invalid attempts but doesnot unlocks automatically.

I know how to manually unlock the user but i want to do this automatically.

Please suggest.

Configratioon files are as below.
Code:

[LDAP Server]# cat passwordpolicy.ldif
dn: cn=default,ou=policies,dc=Domain,dc=com
cn: default
objectClass: pwdPolicy
objectClass: device
objectClass: top
pwdAttribute: userPassword
pwdMaxAge: 2592000
pwdExpireWarning: 604800
pwdInHistory: 4
pwdCheckQuality: 1
pwdMinLength: 14
pwdMaxFailure: 3
pwdLockout: TRUE
pwdLockoutDuration: 300
pwdGraceAuthNLimit: 0
pwdFailureCountInterval: 0
pwdMustChange: TRUE
pwdAllowUserChange: TRUE
pwdSafeModify: FALSE


LDAP Server # ldapsearch -x -D cn=Manager,dc=Domain,dc=com -w tcs12345 -b "ou=People,dc=Domain,dc=com" -s sub -h `hostname` pwdAccountLockedTime
# extended LDIF
#
# LDAPv3
# base <ou=People,dc=Domain,dc=com> with scope subtree
# filter: (objectclass=*)
# requesting: pwdAccountLockedTime
#

# People, Domain.com
dn: ou=People,dc=Domain,dc=com

# ldapusr1, People, Domain.com
dn: uid=ldapusr1,ou=People,dc=Domain,dc=com

# ldapapp1, People, Domain.com
dn: uid=ldapapp1,ou=People,dc=Domain,dc=com
pwdAccountLockedTime: 20171010082937Z -------user account is locked

# ldapapp01, People, Domain.com
dn: uid=ldapapp01,ou=People,dc=Domain,dc=com

# search result
search: 2
result: 0 Success

# numResponses: 5
# numEntries: 4

Last edited by Ankushkalra; 10-11-2017 at 06:12 AM.
 
Old 10-10-2017, 07:11 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,635

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by Ankushkalra View Post
Hi,
I have successfully created LDAP server. I want that LDAP users account gets automatically unlocked after 300 seconds. LDAP user gets automatically locked after 3 invalid attempts but doesnot unlocks automatically. I know how to manually unlock the user but i want to do this automatically. Please suggest. Configratioon files are as below.
Code:
[LDAP Server]# cat passwordpolicy.ldif
dn: cn=default,ou=policies,dc=Domain,dc=com
cn: default
objectClass: pwdPolicy
objectClass: device
objectClass: top
pwdAttribute: userPassword
pwdMaxAge: 2592000
pwdExpireWarning: 604800
pwdInHistory: 4
pwdCheckQuality: 1
pwdMinLength: 14
pwdMaxFailure: 3
pwdLockout: TRUE
pwdLockoutDuration: 300
pwdGraceAuthNLimit: 0
pwdFailureCountInterval: 0
pwdMustChange: TRUE
pwdAllowUserChange: TRUE
pwdSafeModify: FALSE


LDAP Server # ldapsearch -x -D cn=Manager,dc=Domain,dc=com -w tcs12345 -b "ou=People,dc=Domain,dc=com" -s sub -h `hostname`  pwdAccountLockedTime
# extended LDIF
#
# LDAPv3
# base <ou=People,dc=Domain,dc=com> with scope subtree
# filter: (objectclass=*)
# requesting: pwdAccountLockedTime
#

# People, Domain.com
dn: ou=People,dc=Domain,dc=com

# ldapusr1, People, Domain.com
dn: uid=ldapusr1,ou=People,dc=Domain,dc=com

# ldapapp1, People, Domain.com
dn: uid=ldapapp1,ou=People,dc=Domain,dc=com
pwdAccountLockedTime: 20171010082937Z   -------user  account is locked

# ldapapp01, People, Domain.com
dn: uid=ldapapp01,ou=People,dc=Domain,dc=com

# search result
search: 2
result: 0 Success

# numResponses: 5
# numEntries: 4
Put your configs and such things in CODE tags, please. You say it doesn't unlock...what gives you this information? Do you wait the required amount of time, and what kind of system are you running as both client and server? The openLDAP documentation gives information about doing this:
http://www.openldap.org/doc/admin24/overlays.html
http://www.zytrax.com/books/ldap/ch6/ppolicy.html

...but if you have a Mac/Windows client, things may be different, especially if you're using Active Directory in addition to LDAP.
 
Old 10-14-2017, 01:28 AM   #3
Ankushkalra
Member
 
Registered: Jan 2017
Posts: 48

Original Poster
Rep: Reputation: Disabled
Thanks for the update!!!

The issue was resolved as i have logged in to LDAP client after 300 seconds with same password.

The issue was that "pwdAccountLockedTime" will not disappear after 300 seconds but disapear only after when i logged in after 300 sec with correct password.

Anyways thanks for the help.
 
  


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
Configure the Directory server in a way to authenticate and unlock a user account arunplanet Linux - Newbie 7 10-04-2012 06:54 AM
Unlock the user account in the red hat directory server arunplanet Linux - Newbie 2 10-04-2012 05:25 AM
Unlock a User Account jaypas Linux - Security 4 08-19-2010 06:24 PM
[Solaris 9] unlock user account noir911 Solaris / OpenSolaris 18 09-08-2009 10:11 PM
Can unlock screen with root password in my user account - want to change this sm1 Linux - Newbie 2 07-24-2005 05:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:27 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