#OUTFILE=out.xml
prefix='EDSAD150'
password="asdf1234"
pass=$(perl -e 'print crypt($ARGV[0], "asdf1234")' $password)
for i in {01..02};do
usname=$prefix""$i
yes $pass | yppasswd $usname
done
I want to change the password of the users but when I run this script I have to give the server password every time because I am usingyppasswd command . But when I used passwd command the NIS files won't change.