Title: Message
This can be kind of confusing.
 
The best I have found when using AdminMisc is to use the UserGetMiscAttributes() function which populates a Hash reference.  This is also in Dave Roth's "Win32 Perl Programmig Second Edition".
 
Win32::AdminMisc::UserGetMiscAttriutes("", $User, \%Attributes);
 
Now you can test for a value using $Attributes and any of the objects in the hash.
 
if( $Attributes{User_Flags} & UF_Accountdisable)  {...
 
You can probably do the same thing with UserGet Attributes, but I think you will find this a little easier.
 
You would use a logical AND to reset it. ( ~UF_Accountdisable)
 
Do I get a better rate on Taxes now?    ;-)
 
Hope this helps.
-----Original Message-----
From: Jahsman Dan L [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 12:38 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: AdminMisc Question

How do I find out what is in the $Flags variable.  When I run
 
UserGetAttributes($Server, $UserName, $UserFullName, $Password, $PasswordAge,
$Privilege, $HomeDir, $Comment, $Flags, $ScriptPath)
 
$Flags comes back with a number.
 
I am interested in finding out what the value of UF_LOCKOUT is and what I need to do to change the value with 
 
UserSetAttributes($Server, $UserName, $UserFullName, $Password, $PasswordAge,
$Privilege, $HomeDir, $Comment, $Flags, $ScriptPath)
 
Thanks for your assistance,
dan

Reply via email to