[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | DIGITAL UNIX (FORMERLY KNOWN AS DEC OSF/1) |
Notice: | Welcome to the Digital UNIX Conference |
Moderator: | SMURF::DENHAM |
|
Created: | Thu Mar 16 1995 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 10068 |
Total number of notes: | 35879 |
I'd like to add 20,000 login accounts for University's students.
I have a database of them. There are username, home directory and
initial password in the DBfile.
It is simple to add 20,000 login accounts with shell script
like the following;
1. Shell Script File, add.sh:
----------
while :
do
read USERNAME HOMEDIR
/usr/sbin/useradd -m -d $HOMEDIR/$USERNAME $USERNAME
done
-----------
2. Run :
$ add.sh < DBfile
where DBfile consists of 20,000 lines with user name and home directory.
This script works well.
But, useradd command does not have password string option.
And when I tried to change password of a user with passwd command
and redirection it does not work. That was;
$ passwd userid < passwordfile
where passwordfile have two same strings in two lines.
By the way it is impossible to set manually initial password
with passwd command for 20,000 accounts.
My customer want to set password for each 20,000 userid.
Do you have any idea?
Regards.
Seung-Joo Lee
TS, Digital Korea
[email protected]
[Posted by WWW Notes gateway]
T.R | Title | User | Personal Name | Date | Lines |
---|
9038.1 | | ZEKE::ranger.zko.dec.com::dilsworth | Keith Dilsworth | Wed Mar 05 1997 13:01 | 9 |
| A bourn shell script can't run /bin/passwd. It can invoke
an expect script which can interface with /bin/passwd to
set the password.
The easiest way to do this is with a Perl script. Perl has
a crypt function and can generate the passwd field bypassing
/bin/passwd.
|
9038.2 | See note 9019 | NETRIX::"[email protected]" | Ann Majeske | Wed Mar 05 1997 14:07 | 1 |
| [Posted by WWW Notes gateway]
|