robert3975
MIS
- Oct 22, 2004
- 26
Below is my script but I only want GID 102 to have password chagned but I'm unsure how makre the shell script a variable
echo "Please enter the username that you are wanting to change. Remember that
you must set the password to 123456"
read username
*****more /etc/passwd |grep $username |awk -F: '{print $4}'
read display*****
if test "$display" = "102"
then
passwd $username
passwd -f $username
. /opt/bin/useradm.mnu
elif
echo "You don not have access to change this password. Please press ENTER to
exit"
read exit
then
. /opt/bin/useradm.mnu
fi
echo "Please enter the username that you are wanting to change. Remember that
you must set the password to 123456"
read username
*****more /etc/passwd |grep $username |awk -F: '{print $4}'
read display*****
if test "$display" = "102"
then
passwd $username
passwd -f $username
. /opt/bin/useradm.mnu
elif
echo "You don not have access to change this password. Please press ENTER to
exit"
read exit
then
. /opt/bin/useradm.mnu
fi