[PLUG] Re: bulk addition of users

Keith Morse kgmorse at mpcu.com
Tue Oct 7 09:19:11 UTC 2003


On Tue, 7 Oct 2003, Scott Van Hoosen wrote:

> I'm no shell script expert, but here's a script that will read a text
> file with "firstname lastname" and create users by their first name, 
> with password of their first name. I'll bet someone can come up with
> something better, but this might get you started:
> 
>   #!/bin/bash
>   cat users | while read first last
>   do
>     useradd $first
>     echo $last | passwd --stdin $first
>   done

Wow, I didn't know --stdin existed.  Added between passwd ver 0.64 and 
0.68.  This simplifies the task greatly, many thanks.




More information about the PLUG mailing list