
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!