Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

windows 2000 server importing hkey_users


  • Please log in to reply

#1
thebucs

thebucs

    Member

  • Member
  • PipPip
  • 51 posts
hi all,
i need some help. here is the problem: we hav 16 identical windows 2000 server machines, there is a list of about 20 local user accounts that need to be on these machines. we have one completed, and we are trying to find a shortcut so that we do not have to add and set passwords for all the local users on each server. we are exporting the hkey_users from the one server that is complete, and are trying to import it into the other servers. will this even work and accomplish what we are trying to do? when we import we gat an error that says:
can not import c:XXXXXXX ( XXXXXXX is the file name) : error accessing registry.
are we going about this the worng way? is there a way to do what we are trying to do? :whistling:
if anyone has any suggestions please help. when we started this we where trying to save time, but now its to the point where i JUST HAVE TO KNOW!!! its bugging me that this isnt working
please help
thanks.
  • 0

Advertisements


#2
dsenette

dsenette

    Je suis Napoléon!

  • Administrator
  • 26,019 posts
  • MVP
if it's just a local user account you can use the net command in a batch file

to add a single user you would do

net user <username> <password> /add
so for multiples...you can do the same for each in a batch file

then you can use the net command to add them to the local groups that they need to be

net localgroup <groupname> /add <computername>\<username>

you can type net localgroup to see what groups are available...and with both commands (and any dos command) if any portion of a name has a space in it...then that name has to be in quotes...so if you were adding someone to the power users group it would look like this

net localgroup "power users" /add "my computer's name\james smith'


hope that makes sense
  • 0

#3
thebucs

thebucs

    Member

  • Topic Starter
  • Member
  • PipPip
  • 51 posts
thank you very much that hsould help. if the user account already exists, will it over write the curent account with the new info?
  • 0

#4
dsenette

dsenette

    Je suis Napoléon!

  • Administrator
  • 26,019 posts
  • MVP
if the user account iteslf exists then it will tell you that it already exists..it won't overwrite it
  • 0

#5
thebucs

thebucs

    Member

  • Topic Starter
  • Member
  • PipPip
  • 51 posts
ok, well in that case, there may be a need to remove the user and then add them back with the new password. what would the comand be to delete the user?
  • 0

#6
dsenette

dsenette

    Je suis Napoléon!

  • Administrator
  • 26,019 posts
  • MVP
switch the /add to /delete
  • 0

#7
thebucs

thebucs

    Member

  • Topic Starter
  • Member
  • PipPip
  • 51 posts
i had tried that and it didnt work, but i got it i needed to switch /add with /delete and remove the password from that line as well
thank you very much for all your help i now have the batch file writen and have tested it with SUCCESS!! thanks again
  • 0

#8
dsenette

dsenette

    Je suis Napoléon!

  • Administrator
  • 26,019 posts
  • MVP
glad i could help
  • 0

#9
thebucs

thebucs

    Member

  • Topic Starter
  • Member
  • PipPip
  • 51 posts
ok one more ? for you. one of the passwords that are being added is more than 14 characters long, thus the files stops, gives you a warning that the password is too long and will not work for machines with o/s prior to win 2000, than you hit y and enter to continue. is there a comand to have it accept this password and continue silently without user intervention?
  • 0

#10
thebucs

thebucs

    Member

  • Topic Starter
  • Member
  • PipPip
  • 51 posts
actually, never mind. i got the answer. thanks again for all your help
  • 0

#11
dsenette

dsenette

    Je suis Napoléon!

  • Administrator
  • 26,019 posts
  • MVP
what was the answer? (cuz i don't know)
  • 0

#12
thebucs

thebucs

    Member

  • Topic Starter
  • Member
  • PipPip
  • 51 posts
the answer is that since we dont have any machines older than 2000, i just added /y to the end of the line with the long password. this answers yes to the question if you want to continue and the script runs without issues. once i got the script done, the first time my director informed me that there where a bunch of additional users he wanted to add to the script. the script ended up being 7 printed pages long. so again i thank you for all of your help. :help: imagine trying to add that many users on 16 servers. :blink:
thanks again. :whistling:
  • 0

#13
thebucs

thebucs

    Member

  • Topic Starter
  • Member
  • PipPip
  • 51 posts
ok, after all this time, i had to change the script to add the following options:
user cannot change password, and password never expires. here is what i have figured out.

net user ons1 #!wdfons1 /add /expires:never /passwordchg:no

the result of this is the line saying the comand completed successfully, it adds the user,
however when i look at the user properties, i see that the user cannot change
password selection is marked, but the password nerver expires box is not
marked.

i am running this on windows 2000 server

what have i done wrong now. microsoft website was no help, it said to do exactly what i have done. i figured it was time to consult the experts, so i am asking Geeks To Go :whistling: any help would be greatly appreciated.



im sorry, i should have started a new post.
i have done so here is the link for the new post, or see topic net user options in a batch file

http://www.geekstogo...le-t131475.html



sorry for the mess up
thanks

Edited by thebucs, 22 September 2006 - 10:34 AM.

  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP