<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.tetrain.com/index.php?action=history&amp;feed=atom&amp;title=Script_to_checkuser_after_createded_date</id>
	<title>Script to checkuser after createded date - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.tetrain.com/index.php?action=history&amp;feed=atom&amp;title=Script_to_checkuser_after_createded_date"/>
	<link rel="alternate" type="text/html" href="https://wiki.tetrain.com/index.php?title=Script_to_checkuser_after_createded_date&amp;action=history"/>
	<updated>2026-07-25T06:40:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://wiki.tetrain.com/index.php?title=Script_to_checkuser_after_createded_date&amp;diff=1813&amp;oldid=prev</id>
		<title>Amit at 08:38, 14 April 2015</title>
		<link rel="alternate" type="text/html" href="https://wiki.tetrain.com/index.php?title=Script_to_checkuser_after_createded_date&amp;diff=1813&amp;oldid=prev"/>
		<updated>2015-04-14T08:38:12Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:38, 14 April 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[category:Heromotocorp Biz]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[category:Tetra Clients]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Script To get the user after a created date ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Script To get the user after a created date ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Amit</name></author>
	</entry>
	<entry>
		<id>https://wiki.tetrain.com/index.php?title=Script_to_checkuser_after_createded_date&amp;diff=1812&amp;oldid=prev</id>
		<title>Amit: Created page with &quot; == Script To get the user after a created date ==    [zimbra@mail ~]$ cat /tmp/usr_list.sh  #!/bin/bash  #Display date will contain the date which is acceptable by ldap  disp...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.tetrain.com/index.php?title=Script_to_checkuser_after_createded_date&amp;diff=1812&amp;oldid=prev"/>
		<updated>2015-04-14T08:36:30Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; == Script To get the user after a created date ==    [zimbra@mail ~]$ cat /tmp/usr_list.sh  #!/bin/bash  #Display date will contain the date which is acceptable by ldap  disp...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
== Script To get the user after a created date ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 [zimbra@mail ~]$ cat /tmp/usr_list.sh&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #Display date will contain the date which is acceptable by ldap&lt;br /&gt;
 displaydate=`date -d &amp;quot;87 days ago&amp;quot; +%Y%m%d`&amp;quot;000000Z&amp;quot;&lt;br /&gt;
 # Get ldap password from zimbra config&lt;br /&gt;
 ldappass=`/opt/zimbra/bin/zmlocalconfig -s -m nokey zimbra_ldap_password`&lt;br /&gt;
 # Get ldap dn from zimbra config&lt;br /&gt;
 ldapdn=`/opt/zimbra/bin/zmlocalconfig -s -m nokey zimbra_ldap_userdn`&lt;br /&gt;
 # Get ldap URL from zimbra config&lt;br /&gt;
 ldapurl=`/opt/zimbra/bin/zmlocalconfig -s -m nokey ldap_url`&lt;br /&gt;
 # ldapsearch and arguments&lt;br /&gt;
 ldapsearch=&amp;#039;/opt/zimbra/bin/ldapsearch&amp;#039;&lt;br /&gt;
 ldapargs=&amp;quot;-LLL -x -H $ldapurl -w $ldappass -D $ldapdn &amp;quot;&lt;br /&gt;
 # We&amp;#039;re only interested in the e-mail address and creation time&lt;br /&gt;
 ldapattrs=&amp;quot;zimbraMailDeliveryAddress createTimestamp&amp;quot;&lt;br /&gt;
 # ldapsearch for all zimbra accounts that are active, created on or after $displaydate&lt;br /&gt;
 $ldapsearch $ldapargs -b &amp;#039;ou=people,dc=heromotocorp,dc=biz&amp;#039; &amp;quot;(&amp;amp;(objectclass=zimbraAccount)(!(objectclass=zimbraCalendarResource)) (zimbraAccountStatus=Active)(createTimestamp&amp;gt;=$displaydate))&amp;quot; $ldapattrs \| awk &amp;#039;&lt;br /&gt;
 # Set Field Seperator to : and initialise our variables&lt;br /&gt;
 BEGIN {FS=&amp;quot;: &amp;quot;;email=0;timestamp=0}&lt;br /&gt;
 # If line contains the email address, store it&lt;br /&gt;
 /zimbraMailDeliveryAddress/ {email=$2}&lt;br /&gt;
 # If line contains the create time, store it in a more readable format&lt;br /&gt;
 /createTimestamp/ {timestamp=substr($2,0,4) &amp;quot;-&amp;quot; substr($2,5,2) &amp;quot;-&amp;quot; substr($2,7,2)}&lt;br /&gt;
 # If the line contains dn: we know we are starting with a new entry, print our&lt;br /&gt;
 # previous data and reset variables&lt;br /&gt;
 /dn:/ {if (email) print email &amp;quot;,&amp;quot; timestamp; email=0; timestamp=0}&lt;br /&gt;
 # If we reach the end of input, print the last entry&lt;br /&gt;
 END {if (email) print email &amp;quot;,&amp;quot; timestamp}&amp;#039; &amp;gt; /tmp/accounts_created_last_87_days_from_`date +%F`.csv&lt;/div&gt;</summary>
		<author><name>Amit</name></author>
	</entry>
</feed>