cat user.txt|while read line
do
status=`grep $line /etc/passwd`
if [ -n "$status" ]
then
echo "$line:foxconn123" > /tmp/passwd
chpasswd < /tmp/passwd
chage -d 0 $line
else
echo "The account $line does not exist!!!"
fi
done
/usr/lib64/yp/ypinit -m <<!
^d
y
!
/usr/sbin/yppush -h ap2 passwd.byname
/usr/sbin/yppush -h ap2 group.byname
/usr/sbin/yppush -h ap2 shadow.byname
/usr/sbin/yppush -h ap3 passwd.byname
/usr/sbin/yppush -h ap3 group.byname
/usr/sbin/yppush -h ap3 shadow.byname