- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Query ldap user password aging details
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2009 04:50 PM
тАО05-19-2009 04:50 PM
RHEL as servers with 2.4 and 2.6 kerenel
I am looking to find the last password change for an ldap user. How can i query that in ldap?
I always use getprpw or chage which is not useful in this context.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2009 04:44 AM
тАО05-20-2009 04:44 AM
Re: Query ldap user password aging details
http://docs.sun.com/source/816-6400-10/lsearch.html
Allegedly it works for Red Hat as well but we haven't implemented LDAP authentication on Linux. Attached are some excerpts from a script (again, HP-UX) to obtain the password change date.
- Kevin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2009 06:26 AM
тАО05-20-2009 06:26 AM
Re: Query ldap user password aging details
ldapsearch -x -D "cn=Directory Manager" -b dc=domain,dc=com -H ldaps://server.domain.com -W objectclass=posixAccount shadowLastChange
Ensure to specify a BIND DN with enough privileges to read the attributes.
Then you can convert to localtime using perl the returned value:
perl -e 'print scalar localtime(12011),"\n"'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2009 06:33 AM
тАО05-20-2009 06:33 AM
Re: Query ldap user password aging details
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2009 10:30 AM
тАО05-20-2009 10:30 AM
Re: Query ldap user password aging details
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2009 10:32 AM
тАО05-20-2009 10:32 AM
Re: Query ldap user password aging details
Change your query to:
ldapsearch -x -ZZ -LLL -b dc=xxxx,dc=com objectClass=posixAccount
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2009 11:38 PM
тАО05-20-2009 11:38 PM
Re: Query ldap user password aging details
whatever the db is (passwd, ldap, etc) the native samba command is:
pdbedit -P "minimum password age"
(see man pages for detail)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2009 05:57 AM
тАО05-21-2009 05:57 AM
Re: Query ldap user password aging details
ldapsearch -x -ZZ -LLL -b dc=alcoa.com,dc=com objectClass=*
You should see all your objects. Do you already have uses created?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2009 12:14 PM
тАО05-21-2009 12:14 PM
Re: Query ldap user password aging details
ldapsearch -x -ZZ -LLL -b dc=alcoa,dc=com objectClass=*
I told you to run the wrong command before, the dc=alcoa.com should be dc=alcoa,dc=com.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-22-2009 07:28 AM
тАО05-22-2009 07:28 AM
SolutionThis is because, just some of the accounts, have the shadowAccount objectclass on it. Your user creation tool should allow you to specify this.
Please, download install and configure ldapadmin.exe (for windows). This is a super-easy tool to create and modify users attributes, including shadow options.
>>> Also i did not undertstand how to convert the "shadowLastChange: 14348" to a date.
The procedure is correct, and the date returned is the default date, meaning that the value was not modified.
" Authentication requires access to password field, that should be not accessible by default. Annother issue is that during password change using passwd shadowLastChange needs to be accessible as well. Following code shows example ACL setting that permits access to shadowLastChange:
access to attr=shadowLastChange
by dn="cn=manager,dc=example,dc=com" write
by self write
by * read
"
Reference:
https://help.ubuntu.com/7.04/server/C/openldap-server.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2009 02:17 AM
тАО07-02-2009 02:17 AM