From owner-ietf-ldapbis@OpenLDAP.org Fri Apr 07 11:38:55 2006
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.43)
	id 1FRt31-0000NZ-Ms
	for ldapbis-archive@lists.ietf.org; Fri, 07 Apr 2006 11:38:55 -0400
Received: from boole.openldap.org ([204.152.186.50])
	by ietf-mx.ietf.org with esmtp (Exim 4.43)
	id 1FRt30-0000X1-BA
	for ldapbis-archive@lists.ietf.org; Fri, 07 Apr 2006 11:38:55 -0400
Received: from boole.openldap.org (smmsp@localhost [IPv6:::1])
	by boole.openldap.org (8.13.3/8.13.3) with ESMTP id k37FUPB0025755
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Fri, 7 Apr 2006 15:36:37 GMT
	(envelope-from owner-ietf-ldapbis@OpenLDAP.org)
Received: from localhost (majordomo@localhost)
	by boole.openldap.org (8.13.3/8.13.3/Submit) with SMTP id k37FQ8No025176;
	Fri, 7 Apr 2006 15:26:08 GMT
	(envelope-from owner-ietf-ldapbis@OpenLDAP.org)
X-Authentication-Warning: boole.openldap.org: majordomo owned process doing -bs
Received: by OpenLDAP.org (bulk_mailer v1.13); Fri, 7 Apr 2006 15:26:08 +0000
Received: from boole.openldap.org (kurt@localhost [IPv6:::1])
	by boole.openldap.org (8.13.3/8.13.3) with ESMTP id k37FQ7E3025165
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <ietf-ldapbis@openldap.org>; Fri, 7 Apr 2006 15:26:07 GMT
	(envelope-from kurt@boole.openldap.org)
Received: (from kurt@localhost)
	by boole.openldap.org (8.13.3/8.13.3/Submit) id k37FQ7kh025164
	for ietf-ldapbis@openldap.org; Fri, 7 Apr 2006 08:26:07 -0700 (PDT)
	(envelope-from kurt)
Received: from damcogroup.com (sdi-202-74-del.sdi.o.id [210.7.74.202] (may be forged))
	by boole.openldap.org (8.13.3/8.13.3) with ESMTP id k37FN0Xu024786
	for <ietf-ldapbis@OpenLDAP.org>; Fri, 7 Apr 2006 15:23:05 GMT
	(envelope-from krishanr@damcogroup.com)
Received: from WorldClient by damcogroup.com
	(MDaemon.PRO.v7.2.1.R)
	with ESMTP id md50000374597.msg
	for <ietf-ldapbis@OpenLDAP.org>; Fri, 07 Apr 2006 20:52:33 +0530
Received: via WorldClient with HTTP;
	Fri, 07 Apr 2006 20:52:28 +0530
Date: Fri, 07 Apr 2006 20:52:28 +0530
From: "Krishan Rathi" <krishanr@damcogroup.com>
To: "ietf-ldapbis@OpenLDAP.org" <ietf-ldapbis@OpenLDAP.org>
Subject: password expiration check
MIME-Version: 1.0
Message-ID: <WorldClient-F200604072052.AA52280768@damcogroup.com>
X-Mailer: WorldClient 7.2.1
X-Authenticated-Sender: krishanr@damcogroup.com
X-Return-Path: krishanr@damcogroup.com
X-MDaemon-Deliver-To: ietf-ldapbis@OpenLDAP.org
Content-Type: text/plain
Sender: owner-ietf-ldapbis@OpenLDAP.org
Priority: non-urgent
X-Loop: OpenLDAP
Precedence: bulk
Comment: ietf-ldapbis mailing list <http://www.OpenLDAP.org/lists/>
List-Archive: <http://www.OpenLDAP.org/lists/ietf-ldapbis/>
List-Help: <mailto:ietf-ldapbis-request@OpenLDAP.org?body=help>
List-ID: ietf-ldapbis mailing list <ietf-ldapbis@OpenLDAP.org>
List-Unsubscribe: <mailto:ietf-ldapbis-request@OpenLDAP.org?body=unsubscribe>
X-Spam-Score: 0.5 (/)
X-Scan-Signature: 9ed51c9d1356100bce94f1ae4ec616a9

Hi 
 
i had tried to find out the list of all user's whose passwords are expired. 
i had written some jndi code by finding the max age and then find out the 
current time and subtracted this current time from max age using the 
following code 
 
 
"Attributes attbts=ctx.getAttributes("cn=pwdpolicy");
         String maxAge=(String)attbts.get("pwdMaxAge").get();
         Date  Today = new Date();
         System.out.println("maxAge"+maxAge);
         long curTime=(Today.getTime())-Long.parseLong(maxAge)*1000;"
 
and then parse it and create a string time as follows
  
String time=year+month+day+hour+minute+second+"Z"; 
 
where "year" "month" etc were parsed from curTime 
 
 
now i can get the list by using following code
 
 
"String filterCriteria="(&(objectclass=dci-user)(pwdChangedTime>="+time+")";
        NamingEnumeration results = ctx.search(baseDN,filterCriteria, sc); "
 
but the current time which i am getting is the time of my system not the 
time of ldap server
 
so my questions are following;
 
1.Can there is any way by which i can get the tivole sever's system time.
 
2.If there is no way then can you suggest any other way to find out the list 
of user's whose passwords are expired.
 
please help me.
 
 
Thanks.
Krishan Rathi.




From owner-ietf-ldapbis@OpenLDAP.org Fri Apr 07 12:06:44 2006
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org)
	by megatron.ietf.org with esmtp (Exim 4.43)
	id 1FRtTw-0000os-Sr
	for ldapbis-archive@lists.ietf.org; Fri, 07 Apr 2006 12:06:44 -0400
Received: from boole.openldap.org ([204.152.186.50])
	by ietf-mx.ietf.org with esmtp (Exim 4.43)
	id 1FRtTv-0001lI-Fl
	for ldapbis-archive@lists.ietf.org; Fri, 07 Apr 2006 12:06:44 -0400
Received: from boole.openldap.org (smmsp@localhost [IPv6:::1])
	by boole.openldap.org (8.13.3/8.13.3) with ESMTP id k37G5wvO028725
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Fri, 7 Apr 2006 16:06:07 GMT
	(envelope-from owner-ietf-ldapbis@OpenLDAP.org)
Received: from localhost (majordomo@localhost)
	by boole.openldap.org (8.13.3/8.13.3/Submit) with SMTP id k37G2XtM028531;
	Fri, 7 Apr 2006 16:02:33 GMT
	(envelope-from owner-ietf-ldapbis@OpenLDAP.org)
X-Authentication-Warning: boole.openldap.org: majordomo owned process doing -bs
Received: by OpenLDAP.org (bulk_mailer v1.13); Fri, 7 Apr 2006 16:02:33 +0000
Received: from gypsy.OpenLDAP.org (24-205-218-53.dhcp.crcy.nv.charter.com [24.205.218.53] (may be forged))
	(authenticated bits=0)
	by boole.openldap.org (8.13.3/8.13.3) with ESMTP id k37G2RO7028493
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Fri, 7 Apr 2006 16:02:27 GMT
	(envelope-from Kurt@OpenLDAP.org)
Message-Id: <7.0.1.0.0.20060407084615.035ed2e8@OpenLDAP.org>
X-Mailer: QUALCOMM Windows Eudora Version 7.0.1.0
Date: Fri, 07 Apr 2006 09:01:28 -0700
To: "Krishan Rathi" <krishanr@damcogroup.com>
From: "Kurt D. Zeilenga" <Kurt@OpenLDAP.org>
Subject: Re: password expiration check
Cc: "ietf-ldapbis@OpenLDAP.org" <ietf-ldapbis@OpenLDAP.org>
In-Reply-To: <WorldClient-F200604072052.AA52280768@damcogroup.com>
References: <WorldClient-F200604072052.AA52280768@damcogroup.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: owner-ietf-ldapbis@OpenLDAP.org
Priority: non-urgent
X-Loop: OpenLDAP
Precedence: bulk
Comment: ietf-ldapbis mailing list <http://www.OpenLDAP.org/lists/>
List-Archive: <http://www.OpenLDAP.org/lists/ietf-ldapbis/>
List-Help: <mailto:ietf-ldapbis-request@OpenLDAP.org?body=help>
List-ID: ietf-ldapbis mailing list <ietf-ldapbis@OpenLDAP.org>
List-Unsubscribe: <mailto:ietf-ldapbis-request@OpenLDAP.org?body=unsubscribe>
X-Spam-Score: 0.1 (/)
X-Scan-Signature: fb6060cb60c0cea16e3f7219e40a0a81

Krishan,

Please note that ietf-ldapbis@openldap.org mailing list is
for discussing the work of the IETF LDAPv3 Revision
Working Group (LDAPBIS), in particular, the revision of the
(base) LDAPv3 Technical Specification.

Discussion of LDAP extension specifications, including
password policies, should be directed to the IETF LDAP
Extensions <ldapext@ietf.org> mailing list.

Discussions regarding particular LDAP implementations
should be directed to a forum chartered to discuss that
implementation.  Sun operates a forum at:
   http://forum.java.sun.com/forum.jspa?forumID=51
for JNDI discussions.  IBM operates a newsgroup available
at:
   http://groups.google.com/group/ibm.software.ldap

And there is is a general LDAP list at:
   http://listserver.itd.umich.edu/cgi-bin/lyris.pl?enter=ldap

(These might not be the best forums for discussions of
these vendor's wares, I suggest those with other
suggestions send them off-list to Krishan.)

Regards, Kurt (LDAPBIS co-chair)


At 08:22 AM 4/7/2006, Krishan Rathi wrote:
>Hi 
> 
>i had tried to find out the list of all user's whose passwords are expired. 
>i had written some jndi code by finding the max age and then find out the 
>current time and subtracted this current time from max age using the 
>following code 
> 
> 
>"Attributes attbts=ctx.getAttributes("cn=pwdpolicy");
>         String maxAge=(String)attbts.get("pwdMaxAge").get();
>         Date  Today = new Date();
>         System.out.println("maxAge"+maxAge);
>         long curTime=(Today.getTime())-Long.parseLong(maxAge)*1000;"
> 
>and then parse it and create a string time as follows
>  
>String time=year+month+day+hour+minute+second+"Z"; 
> 
>where "year" "month" etc were parsed from curTime 
> 
> 
>now i can get the list by using following code
> 
> 
>"String filterCriteria="(&(objectclass=dci-user)(pwdChangedTime>="+time+")";
>        NamingEnumeration results = ctx.search(baseDN,filterCriteria, sc); "
> 
>but the current time which i am getting is the time of my system not the 
>time of ldap server
> 
>so my questions are following;
> 
>1.Can there is any way by which i can get the tivole sever's system time.
> 
>2.If there is no way then can you suggest any other way to find out the list 
>of user's whose passwords are expired.
> 
>please help me.
> 
> 
>Thanks.
>Krishan Rathi.




