Computing.Net > Forums > Programming > XP batch user account creation

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

XP batch user account creation

Reply to Message Icon

Name: hawtcrl
Date: December 9, 2008 at 18:47:48 Pacific
OS: XP
CPU/Ram: Intel DUO
Product: Panasonic / CF-51
Comment:

Sorta new to batch files. What I would like to do is create two user accounts on an XP system by running a batch or VBS. I found the "net user" command for creating the user name and password, but I need to be able to set the privileges (Admin, change password at logon) basically all the functions that are available through the "manage" function in my computer. Any help is greatly appreciated!



Sponsored Link
Ads by Google

Response Number 1
Name: Holla
Date: December 9, 2008 at 22:17:10 Pacific
Reply:

hawcrl,

net localgroup Administrator username/add
?

Dont know about how to configure to change
pwd at next login.

--
Holla.


0

Response Number 2
Name: Holla
Date: December 9, 2008 at 22:38:56 Pacific
Reply:

I think you need to use vbscript to change the "user must change password at next logon" option.

Dont know whether this is applicable to all OSs.

ref: http://www.microsoft.com/technet/sc...

Set usr = GetObject("LDAP://CN=adegutis, OU=Mis, OU=Accounts, DC=domainname, DC=Com") 
usr.Put "pwdLastSet", CLng(-1)
usr.SetInfo

Just change the first line as follows:
CN = the account name
OU = you need one for each level OU
DC = should match your domain name

In the second line, CLng(0) means user has to change pwd at next login.
CLng(-1) means user need not change pwd at next login.

--
Holla.


0

Response Number 3
Name: Razor2.3
Date: December 11, 2008 at 01:28:41 Pacific
Reply:

You can see what you can do from the NET USER interface with:
NET HELP USER


0

Response Number 4
Name: hawtcrl
Date: December 11, 2008 at 13:08:54 Pacific
Reply:

Thank you for your efforts in getting me an answer, but I think im out of luck since I forgot to mention that the computers I need to do this for are not on a domain, and didnt have any luck with the VBS for changing the password at next logon


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: XP batch user account creation

Creating a user account www.computing.net/answers/programming/creating-a-user-account/16971.html

Validate users response on XP batch www.computing.net/answers/programming/validate-users-response-on-xp-batch/13179.html

updating mysql with xp batch www.computing.net/answers/programming/updating-mysql-with-xp-batch/15743.html