NetUserSetInfo
- From
- Vadim Yegorov ()
- To
- Alex Fedotov ()
- Date
- 2001-11-29T14:07:24Z
- Area
- SU.WINDOWS.NT.PROG
From: "Vadim Yegorov" <zg@matrica.apollo.lv>
Hello, Alex!
You wrote to Vadim Yegorov on Thu, 29 Nov 2001 03:34:13 +0000 (UTC):
>> Что нужно сделать, чтобы
>> NetUserSetInfo(servername,username,3,data,NULL);
>> поменял все параметры, кроме пароля?
>> Или хотя бы как поставить аккаунту флаг "User must change password at
>> next logon" не затронув пароль?
AF> А уровень 1008 и структура USER_INFO_1008 чем не устраивают?
Это не то. имялся ввиду:
usri3_password_expired
Specifies a DWORD value that contains password expiration information.
The NetUserGetInfo and NetUserEnum functions return zero if the password has
not expired (and nonzero if it has).
When you call NetUserAdd or NetUserSetInfo, specify a nonzero value in this
member to inform users that they must change their password at the next
logon. To turn off this message, call NetUserSetInfo and specify zero in
this member. Note that you cannot specify zero to negate the expiration of a
password that has already expired.
Вроде я разобрался - если передавать usri3_password=NULL, то пароль не
меняется. Беспокоит то, что это нигде не описано...
Хотя:
usri3_parms
Pointer to a Unicode string that is reserved for use by applications. This
string can be a null string, or it can have any number of characters before
the terminating null character. Microsoft products use this member to store
user configuration information. Do not modify this information.
Для этог параметра тоже нет отдельного левела и продукты Microsoft либо
пользуют недокументированные функции, либо поступают вышеописанным способом.
Best regards,
ZG
--- ifmail v.2.15dev5
* Origin: Demos online service (2:5020/400)