![]() |
|
|||||||
| Notices |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Oct 2009
Age: 23
Posts: 2
Thanks: 2
Thanked 0 Times in 0 Posts
Rep Power: 0
![]() OS:
|
How do i Create new users with a .bat file in Windows xp?
can anyone help me, i need to add many of the same users onto several PC's so i want to create a .bat file that i run on each pc
But i want the users to be part of the guest account only, also the 'User Cannot Change Password' and 'Password never expires' Must be ticked i have been able to add a user using this command that i found online: Code:
@echo off start net user /add User1 password net localgroup administrators User1 /add net share concfg=C:\ /grant:User1, full net user User1 password please ![]() Last edited by Strider; 22-10-2009 at 08:04 PM.. |
|
|
|
|
|
#2 |
|
Founder
![]() Join Date: Nov 2005
Location: The Last City Zion!
Posts: 3,539
Thanks: 287
Thanked 345 Times in 298 Posts
Rep Power: 62
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() OS:
|
Re: How do i Create new users with a .bat file in Windows xp?
What if you remove the line net localgroup administrators User1 /add from the batch script?
Here is a neat net command reference: http://ss64.com/nt/net_useradmin.html
__________________
Want to ask a question? Try This! A guide on how to post a question, reply to a post etc.
Last edited by Strider; 22-10-2009 at 08:08 PM.. |
|
|
|
| Thanked Users: | Vaughanschoeman (22-10-2009) |
|
|
#3 |
|
Newbie
Join Date: Nov 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
![]() OS:
|
Re: How do i Create new users with a .bat file in Windows xp?
Replace the code in your BAT file with the lines below. This will create a "Limited Account" With NO password.
@echo off start net user /add User1 net localgroup guest User1 /add net share concfg=C:\ /grant:User1, limited |
|
|
|
|
|
#4 |
|
Newbie
Join Date: Nov 2009
Age: 33
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
![]() OS:
|
Re: How do i Create new users with a .bat file in Windows xp?
Hi ,
Are you using Active Directory? If so, DSADD is the right tool. Create an Excel spreadsheet with 2 tabs. One tab (UserInformation) is populated with the following column names in ROW1 (the values by each are the formulas in row 2 - if not a data string value): A- SAM Name B- FirstName C- LastName D- Description E- Password F- UPN = =A2&"@xx.company.com" G- Display = =B2&" "&C2 H- Office I- Email = =B2&"."&C2&"@xx.company.com" J- MustChangePwd = yes/no K- Disabled = yes/no L- LoginScript = login.bat M- cn= =A2 N- ou= =users O- ou= =newOU P- dc= =xx Q- dc= =company R- dc= =com S- -samid =A2 T- -upn =CONCATENATE(AE2&F2&AE2) U- -fn =CONCATENATE(AE2&B2&AE2) V- -ln =CONCATENATE(AE2&C2&AE2) W- -desc =CONCATENATE(AE2&D2&AE2) X- -display =CONCATENATE(AE2&B2&" "&C2&AE2) Y- -pwd =E2 Z- -office =H2 AA- -email =CONCATENATE(AE2&I2&AE2) AB- -loscr =L2 AC- -mustchpwd =J2 AD- -disabled =K2 AE- " Create as many rows as necessary in this for each of the users. A second tab would be named DSadduserTemplate and the contents of row 2 and below would be: ="dsadd user cn="&UserInformation!M2&",ou="&UserInformation!N2& ",ou="&UserInformation!O2&",dc="&UserInformation!P 2&",dc="&UserInformation!Q2&",dc="&UserInformation !R2&" -samid "&UserInformation!S2&" -upn "&UserInformation!T2&" -fn "&UserInformation!U2&" -ln "&UserInformation!V2&" -desc "&UserInformation!W2&" -display "&UserInformation!X2&" -pwd "&UserInformation!Y2&" -office "&UserInformation!Z2&" -email "&UserInformation!AA2&" -loscr "&UserInformation!AB2&" -mustchpwd "&UserInformation!AC2&" -disabled "&UserInformation!AD2 Copy this down as many rows as needed. Once this information is populated with values from the UserInformation tab, you can copy this to a BAT or CMD file and execute. Modify as needed to change values for groups. The command actually looks something like: dsadd user cn=0,ou=users,ou=YOUROU,dc=xx,dc=company,dc=com -samid 0 -upn @xx.company.com -fn 0 -ln 0 -desc "" -display " " -pwd changeme -office Location -tel 0 -email .@xx.company.com.com -loscr login.bat -mustchpwd No -disabled Yes We created the new users as disabled so we could add them to groups as needed and then train them on how to use their new logins. Good luck Cheers |
|
|
|
|
|
#5 |
|
Junior Member (25+)
Join Date: Nov 2009
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
![]() OS:
|
Re: How do i Create new users with a .bat file in Windows xp?
For creating local users try out tbam88's advice.
If the PC's you want to create users on are part of the same domain you could create them only once: Create new NETWORK users using BATCH FILE in XP...? - Yahoo! Answers |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
< Windows Help - MS Office Help - Hardware Support >
| New To Site? | Need Help? |