Adding XP users in command prompt
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Adding XP users in command prompt

  1. #1
    Senior Member
    Join Date
    Sep 2001
    Posts
    150

    Adding XP users in command prompt

    I'm trying to remember how to add XP users from the command prompt and coming up empty.

    I'm attempting to add a ton of users via a text file so I don't have to type things in manually on every machine.

    Also, I'm wondering if there's a flag in the command prompt that I can set to now show accounts in the welcome screen. I know how to do it all in the administration panel, but I'm trying to do this on multiple machines, so writing a script is my best option.

    Any help or links are appreciated.

  2. #2
    Now, RFC Compliant! Noia's Avatar
    Join Date
    Jan 2002
    Posts
    1,210
    net user add [Username] [Password | *] [options] [/Domain]

    - Noia
    With all the subtlety of an artillery barrage / Follow blindly, for the true path is sketchy at best. .:Bring OS X to x86!:.
    Og ingen kan minnast dei linne drag i dronningas andlet den fagre dag Då landet her kvilte i heilag fred og alle hadde kjærleik å elske med.

  3. #3
    Banned
    Join Date
    May 2003
    Posts
    1,004
    The windows 2000 server resource kit (http://www.microsoft.com/windows2000...er/S_tools.asp )

    includes addusers.exe, I think this is what you are looking for... however I don't run XP so I don't know if it is compatible or if a resource kit exists for XP and to be honest I am too tired to look right now, however I hope this sets you in the right direction.
    best of luck

    catch

  4. #4
    Senior Member
    Join Date
    Jan 2002
    Posts
    1,207
    I'm attempting to add a ton of users via a text file so I don't have to type things in manually on every machine.
    Are we to assume from that that they're local users not domain users?

    Unless you have some special reason you are probably better off adding them to a domain (NT4 or Active Directory). The "net user" command mentioned by Noia will work to add local users or domain users depending on the options.

    You can add users en-masse using a simple script that uses "net user" - for instance a batch file or perl script.

  5. #5
    Senior Member
    Join Date
    Nov 2001
    Posts
    4,786
    simple script:

    for /F "tokens=1,2" %x in (yourfile.txt) DO net user add %x %y [options] [/Domain]

    if used in a batch file use %%x and %%y
    Bukhari:V3B48N826 “The Prophet said, ‘Isn’t the witness of a woman equal to half of that of a man?’ The women said, ‘Yes.’ He said, ‘This is because of the deficiency of a woman’s mind.’”

  6. #6
    Senior Member
    Join Date
    Sep 2001
    Posts
    150
    I'm adding them locally on 2 or 3 XP boxes in a peer to peer network, but want all the user on each station, so I just created a text file with usernames (and pre-generated passwords) that I'd like to add to each machine.

    I also have a few administrative accounts as well that I dont want to show up in the XP welcome screen (in case it gets turned on)...are there flags for that in the net user command?

  7. #7
    Junior Member
    Join Date
    May 2003
    Posts
    5
    net user username password /add (add user)
    net localgroup administrators username /add (upgrade your popedom)

  8. #8
    Banned
    Join Date
    May 2003
    Posts
    20
    net user add [Username] [Password | *] [options] [/Domain]

    Like Noia said by using the net command you shoudl be able to achieve this very easily.

  9. #9
    AO's MMA Fanatic! Computernerd22's Avatar
    Join Date
    Mar 2003
    Location
    Miami, FL
    Posts
    795
    net user add [Username] [Password | *] [options] [/Domain]

    - Noia
    Hey Noia, and Tedob1 thanks a lot.

    simple script:

    for /F "tokens=1,2" %x in (yourfile.txt) DO net user add %x %y [options] [/Domain]

    if used in a batch file use %%x and %%y
    Thanks,

  10. #10
    Now, RFC Compliant! Noia's Avatar
    Join Date
    Jan 2002
    Posts
    1,210
    np
    With all the subtlety of an artillery barrage / Follow blindly, for the true path is sketchy at best. .:Bring OS X to x86!:.
    Og ingen kan minnast dei linne drag i dronningas andlet den fagre dag Då landet her kvilte i heilag fred og alle hadde kjærleik å elske med.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •