I have been researching this for days now. I've been to some other forums and been put down for asking. Sorry, I am new and haven't read every single man page available yet. *sigh* I had a moderator at another website tell me that I shouldn't expect help for some random script I pulled out of the darkness of the internet.
I asked about the linux command "newusers".
Specifically, I asked if it would do what I need it to do, and if my syntax was right, and if there was anything else I might need to use to accomplish my goal.
I posted all the info about the commands I thought were right, but needed verified. I will post the info here, and hopefully someone will be kind to this newbie and give me some helpful advice rather than unhelpful put-downs.
I had an old win2kpro system with about 300 user accounts. The drive died. So I couldn't export the accounts, they're all lost. I am setting the new system up with suse 11.3, as that's what I use at home on my personal system. However, my dealings with linux have ONLY been on my personal system, so I haven't had the need to create that many accounts on one box before. So I started researching a tool or script or something that would help. I found "newusers".
Also, I noted when creating a single new user thru YAST, it adds the user both to "users" and to "video" groups. So my other question, besides just adding the users in bulk, is whether the commands below will add them to both users AND video? Or will I have to find a way to separately add them to "video"?
What I found so far was that I should do this:
(chmod the batch-user-add.txt file)
# touch /root/batch-user-add.txt
# chmod 0600 /root/batch-user-add.txt
(open the batch-user-add.txt file to edit it)
# vi /root/batch-user-add.txt
(add the following into the batch-user-add.txt file)
Code:
Unit0106:concorderesident:1201:1001:Unit 106:/home/Unit0106:/bin/bash
Unit0107:concorderesident:1202:1001:Unit 107:/home/Unit0107:/bin/bash
Unit0108:concorderesident:1203:1001:Unit 108:/home/Unit0108:/bin/bash
Unit0109:concorderesident:1204:1001:Unit 109:/home/Unit0109:/bin/bash
Unit0201:concorderesident:1205:1001:Unit 201:/home/Unit0201:/bin/bash
Unit0202:concorderesident:1206:1001:Unit 202:/home/Unit0202:/bin/bash
Unit0203:concorderesident:1207:1001:Unit 203:/home/Unit0203:/bin/bash
Unit0204:concorderesident:1208:1001:Unit 204:/home/Unit0204:/bin/bash
Unit0205:concorderesident:1209:1001:Unit 205:/home/Unit0205:/bin/bash
Unit0206:concorderesident:1210:1001:Unit 206:/home/Unit0206:/bin/bash
Unit0207:concorderesident:1211:1001:Unit 207:/home/Unit0207:/bin/bash
Unit0208:concorderesident:1212:1001:Unit 208:/home/Unit0208:/bin/bash
Unit0209:concorderesident:1213:1001:Unit 209:/home/Unit0209:/bin/bash
Unit0210:concorderesident:1214:1001:Unit 210:/home/Unit0210:/bin/bash
Unit0301:concorderesident:1215:1001:Unit 301:/home/Unit0301:/bin/bash
Unit0302:concorderesident:1216:1001:Unit 302:/home/Unit0302:/bin/bash
Unit0303:concorderesident:1217:1001:Unit 303:/home/Unit0303:/bin/bash
Unit0304:concorderesident:1218:1001:Unit 304:/home/Unit0304:/bin/bash
Unit0305:concorderesident:1219:1001:Unit 305:/home/Unit0305:/bin/bash
Unit0306:concorderesident:1220:1001:Unit 306:/home/Unit0306:/bin/bash
(save the file, and then run the linux command newusers)
# newusers /root/batch-user-add.txt
I didn't find it somewhere in the dark on the internet. newusers is a linux command. I found the info about how to use it between the man pages and various bulletin board posts which have bits and pieces of it, but so many of them have variations on the above commands, so I'm not sure if I've got it right or not. So I am trying to follow the directions between that and the linked man pages of passwd and other related commands, and am trying to find out if it will
A) do what I need it to do,
and B) if I've got the syntax right.
http://linux.die.net/man/8/newusers
http://linux.die.net/man/5/passwd
I don't know how many other ways I can word my questions? I know I'm new to all this, but I HAVE been doing my homework and reading for days now, both man pages and bulletin boards, and articles, and the specific documentation that came with my installation, and trying to ask intelligent questions.
I'm getting discouraged with this and about ready to go back to windoze just to get this computer up and running before the 300 residents of this building throw a fit. I'm very frustrated, and kinda sad about the level of unfriendliness and unhelpfulness I've encountered among the linux "experts". This is pretty much my last try at hoping someone might actually help?