Passwd --stdin pipe

glenn glenn at mail.txwes.edu
Mon Mar 29 16:07:10 UTC 2004


#!/bin/sh

# This script takes a list of user IDs (first column)
# and passwords (second column), and creates user
# accounts on the Linux server.

for i in $(awk '{print$1}' students)
do
useradd $i
grep $i students |awk '{print$2}'| passwd --stdin $i
done

###### That's it! ########





More information about the redhat-list mailing list