WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

wNT
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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:   W14640
Filename:   Adding Users and Setting Flags.txt
File Created: 2001:03:01:13:56:22
Last Updated: 2001:03:01:13:56:22