Adding Users and Setting Flags
Keywords: wntAdd
Question:
I'm trying to add some users in NT. I'm using the Network extender and everything seems to be working fine EXCEPT the flags... I can add the user and only one of the two flags I want. It won't add "cannot change the password" AND "don't expire password."Here's a sample. What am I doing wrong and how can I fix it?
AddExtender("WWWNT34I.DLL") wntUserAddDat("name", "Manager") wntUserAddDat("full_name", "Manager") wntUserAddDat("flags", 1) wntUserAddDat("flags", 64) wntUserAddDat("flags", 65536) wntUserAdd("") wntMemberSet("","Administrators","Manager",@LOCALGROUP)Answer:
You only need to set the flags element once, as follows...AddExtender("WWWNT34I.DLL") wntUserAddDat("name", "Manager") wntUserAddDat("full_name", "Manager") wntUserAddDat("flags", 1|64|65536) ;this sets all three flags wntUserAdd("") wntMemberSet("","Administrators","Manager",@LOCALGROUP)
Article ID: W14640Filename: Adding Users and Setting Flags.txt