Re: Passwd --stdin pipe

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

 



#!/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! ########


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux