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
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to