--- Andrew Nix <andrew.nix@st-paulshigh.manchester.sch.uk> wrote: > > --- Chris Puttick <chris@centralmanclc.com> wrote: > I believe you
can
just modify the spreadsheet and use the newusers
command again - it can update bulk users as well as create them. Have a look at "man newusers" and "man 5 passwd" for details.
I had a look at the help for these two things chris but as I have no idea what so ever as the thier function. It makes using them a little difficult! An example would be really helpful!
Assuming that you have the list of users, export it to a cvs (a comma separated file) and issue the command:
How do I export my spreadsheet to a cvs file? And, what is a cvs file?
Well, assuming it is Office2000 (I stay away from M$ products), etc, just
click "save as" then select the filetype as cvs....
I use OOo 1.1beta2. I had a look in the save as options and it said nothing about cvs files. I ask again what is a cvs file?
Alternativelty, you dont need to export it if you can manually extract all the usernames and save them to a separate plain text file.
for i in $(cat ./the_file | awk -F, '{print $NUM}'); do useradd $NUM -G groupname; done
Then the above script will still apply
Saving it in a text file willwont make it a cvs file tho will it? Does that mean that it doesnt acctually have to be in a cvs file at all?
You'll have to change the above so that $NUM is the column number that the username appears in (i.e. $1, $2, etc) and change "groupname" as appropriate.
-- Andrew Nix
St Pauls Catholic High School Firbank Road Newall Green Wythenshawe Manchester M23 2YS tel: 0161 4375841 ext 168 fax: 0161 4982030