robert3975
MIS
- Oct 22, 2004
- 26
Hi chaps As much as I would like to have an argument and kill this machine
Ive now hit a brick wall and really need some help!!
below is my script it doesn't seem to like if [ $display -eq 102 ] I think just I only want gid 102 to be changed and nothing else. If any one can help and point out how stupid i am feel free!!
oh the shell is bin/sh
./pass1.sh: [: too many arguments
echo "Please enter the username that you are wanting to change. Remember that
you must set the password to 123456"
read username
display=`grep $username /etc/passwd | awk -F: '{print $4}'`
if [ $display -eq 102 ]
then
passwd $username
passwd -f $username
else
echo "You don not have access to change this password. Please press ENTER to
exit"
read exit
fi
Ive now hit a brick wall and really need some help!!
below is my script it doesn't seem to like if [ $display -eq 102 ] I think just I only want gid 102 to be changed and nothing else. If any one can help and point out how stupid i am feel free!!
oh the shell is bin/sh
./pass1.sh: [: too many arguments
echo "Please enter the username that you are wanting to change. Remember that
you must set the password to 123456"
read username
display=`grep $username /etc/passwd | awk -F: '{print $4}'`
if [ $display -eq 102 ]
then
passwd $username
passwd -f $username
else
echo "You don not have access to change this password. Please press ENTER to
exit"
read exit
fi