How to programmatically set the expiration date on NT Account 
Author Message
 How to programmatically set the expiration date on NT Account

I was unsuccessful in setting an account's expiration date.  I pass to
NetUserSetInfo a USER_INFO_1017 structure and set the usri1017_acct_expires
member to 967780800 seconds to compensate for the January 1, 1970 start date
and GMT to EST converstion (14400 seconds differenced, right?).
Unfortunately, when I ran my program the first time, the expiration date was
set to 1/15/70 5:16:59AM.  On subsequent execution with different values,
the expirate date doesn't change.  I've even tried the TIMEQ_FOREVER
constant to no avail.

The documentation for member usri1017_acct_expires says:

Specifies a DWORD value that indicates when the user account expires...The
value is stored as the number of seconds that have elapsed since 00:00:00,
January 1, 1970, GMT.

Help!



Wed, 26 Feb 2003 09:54:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Account Expiration

2. Account expiration

3. Setting Lcoal Account Policies on NT 4 Workstations

4. Setting up NT accounts from Visual Basic

5. VB and Windows NT User Accounts+Set System Default Printer

6. VB and Windows NT User Accounts+Set System Default Printer

7. VB and Windows NT User Accounts+Set System Default Printer

8. Get NT Expiration

9. Cookies - how to determine expiration DATE??

10. Expiration date

11. How does Netscape program expiration date?

12. Get password expiration date

 

 
Powered by phpBB® Forum Software