So the flags come back like this (when using printf command):
Flags = 00000203
Flags = 00000201
Flags = 00000203
Flags = 00000201
Flags = 00000201
How do I use UF_ACCOUNTDISABLE() to extract just the "account disabled" flag? Thanks.
Jim
-----Original Message-----
From: $Bill Luebkert [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 17, 2006 11:42 AM
To: Jim Bartlett
Cc: '[email protected]'
Subject: Re: Win32API::Net
Jim Bartlett wrote:
> I am trying to use Win32API::NET to retrieve all disabled user accts
> on an NT domain. I can retrieve the 'flags' key from the hash after
> executing an enum but I am not sure how to use the UF_ACCOUNTDISABLE()
> function to determine acct status. The manpage indicates it is a
> bitwise OR but that doesn't give me the desired result (it returned
> all users as disabled which is not true). Any guidance? Thanks.
Print the flags as a hex value and post your results.
printf "Flags = %08X\n", $flags;
UF_* values should be close to these:
#define UF_SCRIPT 0x0001
#define UF_ACCOUNTDISABLE 0x0002
#define UF_HOMEDIR_REQUIRED 0x0008
#define UF_LOCKOUT 0x0010
#define UF_PASSWD_NOTREQD 0x0020
#define UF_PASSWD_CANT_CHANGE 0x0040
#define UF_TEMP_DUPLICATE_ACCOUNT 0x0100
#define UF_NORMAL_ACCOUNT 0x0200
#define UF_INTERDOMAIN_TRUST_ACCOUNT 0x0800
#define UF_WORKSTATION_TRUST_ACCOUNT 0x1000
#define UF_SERVER_TRUST_ACCOUNT 0x2000
#define UF_DONT_EXPIRE_PASSWD 0x10000
_______________________________________________ Perl-Win32-Users mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
