[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] Produce 300 users with random passwords



Trond -

Take a look at:

http://www.adel.nursat.kz/apg/index.shtml

I use it to generate both new usernames and passwords for a library internet station management system. Part of the scripting I use looks like this:

#!/bin/bash
# generate random usename
JoePublic=`apg  -a 1 -M l -n 1 -m 4 -x 4`
#generate ramdom password
JoesPassword=`apg  -a 1 -M l -n 1 -m 4 -x 4`
#Create user
adduser -G public $JoePublic
# Assign the user a password
echo $JoesPassword | passwd --stdin $JoePublic

Hope this helps -

Mark Ehle
Computer Support Librarian
Willard Public Library
Battle Creek, Mi


From: Trond Mæhlum <trondrm c2i net>
Reply-To: k12osn redhat com
To: k12osn redhat com
Subject: [K12OSN] Produce 300 users with random passwords
Date: Mon, 20 Oct 2003 14:10:40 +0200

I use a Danish program called nybruger (Danish for new user) to produce
my users. I make a csv file with three columns. Username, real name,
password. This list is saved as .csv. The program then calls adduser for
all the entries in that list and makes my users - complete with homedirs
and all.

I did this the easy way, by making one password for all users, which had
to be changed at first logon. I now see that this was not a good idea...
What I now want to do is to have a program making 300 passwords at
random. I then need to paste that list into the passwords column in the
spreadsheet.

Then when the users are created, I need to print out 300 sheets which
says: Your username is [user1] and your password is [password1]. Where
user and passwords come from that csv list.

Is this doable and if so, how do I do it? If there is an alternative
approach I am open for suggestions....

Regards

Trond Mæhlum


_________________________________________________________________
Compare Cable, DSL or Satellite plans: As low as $29.95. https://broadband.msn.com





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]