I'm not sure if you can get this value using LDAP.  However, according
to the MSDN, you can calculate it based on two other attributes.

http://msdn.microsoft.com/en-us/library/ms677943.aspx

Look for "PasswordExpirationDate".

Unfortunately, I can't test this because we do not expire passwords on
our domain.

You could use an ASP page, CF + COM object or, if you have CF8, use a
..NET object to find this value.

http://msdn.microsoft.com/en-us/library/aa746343(VS.85).aspx

m!ke 

-----Original Message-----
From: Keith McGee [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 20, 2008 7:25 AM
To: CF-Talk
Subject: CFLDAP Password expires

I wrote this app to display when a users password expires, it appears I
am going of   the wrong field, can someone direct me to the right field
or let me know if I am way of base.

Thanks,
Keith

<cftry>
  <cfldap server = "servername"  username="#usr#.domain"
   password="#pss#"
   action = "query"
   name = "getldapinfo"
   start = "dc=domain,dc=com"
   filter = "(&(objectclass=user)(samaccountname=#usr#))"
   attributes = "whenChanged,cn,o,title,mail,telephonenumber"
   sort = "cn ASC">
<cfcatch type="any">
<cfif FindNoCase("Invalid credentials", cfcatch.detail)>....


<cfset variables.myDateString = #left(getldapinfo.whenChanged, 8)#>
<cfset variables.myDateObject = #CreateDate(LEFT(variables.myDateString,
4), MID(variables.myDateString, 5, 2),RIGHT(variables.myDateString,
2))#> <cfset variables.lastpasschange = #CREATEODBCDATE(myDateObject)#> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305701
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to