LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   newusers input file format? (https://www.linuxquestions.org/questions/linux-general-1/newusers-input-file-format-312795/)

Pizentios 04-13-2005 09:41 AM

newusers input file format?
 
Hey,

i am trying to add a batch of users to one of our servers here at work. I was coding a bash script to do it, but then i found out about the newusers command. So, not wanting to re-invent the wheel, i proceeded to read the man page to find out how to use the command. However, the man page tells me a little about the command but nothing about the input file format. I've also tried looking at the info page for newusers but it's the same page as the man page.....if that makes any sense.

here's a link to a on-line version of the man page:

HERE

anyways, i guess my question is: has anybody ever used this command? If so how is the input file formatted? The man page gives minor hints, but it's kinda confusing. Thanks for the help in advance.

Technoslave 04-13-2005 11:32 AM

I've never used the command, but I just did a test of it. The man page does tell you how the input file is supposed to be, but you have to read it twice then take a guess at some things.

newuser1:blah:::New User1:/home/new1:/bin/bash
newuser2:blah:::New User2:/home/new2:/bin/bash
newuser3:blah:::New User3:/home/new3:/bin/bash

That's what the entry of my "new user file" looksl ike. Notice, I didn't put any UID or GID in there, I could if I wanted to, but I wanted to see what the result was. The result is that the new users get created above the 2^16 ID number, which I find interesting, but it works.

Also, the clear text password doesn't get created in /etc/shadow as an MD5 hash, it's created with the old hashing scheme.

Anyway, there ya go...I guess it works, and anything over a few 10 or so new users to add I'd suggest using this.

Pizentios 04-13-2005 02:27 PM

Thanks for the help man. I have about 30-40 users to add to this server, so it's going to save me some time.


All times are GMT -5. The time now is 03:56 PM.