Script take values from text file or excel (excel is better choice). file contains three column
username old password new password
lg1211 cSR121 csd22
lf1245 fDFss sfdge
ms1232 nHJaa hYiao
script
# !/bin/bash
file=/root/Desktop/Scripts/login
# location of file
while read line
do
username=$(echo $line | awk '{print $1}')
oldpassword=$(echo $line | awk '{print $2}')
newpassword=$(echo $line | awk '{print $3}')
passwd $username
done<$file
my quires is how it will take take oldpassword and newpassword after script execute this command passwd $username