LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-28-2018, 11:06 AM   #1
Latitude
Member
 
Registered: Mar 2009
Posts: 65

Rep: Reputation: 16
ldapsearch query for users created between two dates


Hello LQ,

Can anyone advise on an ldapsearch query that will show users created between two dates? I need to query ldap to find out which users were created between 1 OCT 2017 and 15 August 2018 AND belong to a specific group. Thanks in advance.
 
Old 08-28-2018, 11:36 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,637

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by Latitude View Post
Hello LQ,
Can anyone advise on an ldapsearch query that will show users created between two dates? I need to query ldap to find out which users were created between 1 OCT 2017 and 15 August 2018 AND belong to a specific group. Thanks in advance.
Look at the documentation on LDAP, and read the man pages on the ldapsearch command. You should be able to include the "modifytimestamp" directive, and enter something...two directives will give you a range. Add more criteria as necessary.
Code:
(&(modifytimestamp>=<some time stamp>))"
 
  


Reply

Tags
ldap, ldapsearch



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
ldapsearch vs Apache DS LDAP browser (ldapsearch not working properly) eyemole80 Linux - Server 0 02-18-2014 02:45 PM
Listing the created users. stf92 Linux - Newbie 3 07-22-2010 04:41 PM
ldapsearch query saravana_05 Linux - Newbie 1 07-09-2009 02:06 AM
file created/accessed dates plainkeyman Linux - General 4 10-27-2005 07:34 PM
Using FIND to locate files created between certain dates billybobjoe1984 Programming 6 07-23-2005 06:07 PM

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

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