Large password lock script

I am trying to create a script that will take a very large, tab delimited file and then lock accounts.

File headers look like this

id desc server pass sudo lock
test Test user server01 67 no no

"Test user" is under the desc column

Basically if pass column is greater than 60 and lock is no, I need it to ssh to the server in the server column field and lock the account in the id field.

I know i need to use if and awk but I am stumped and running short on time.
Also this needs to be in ksh

Thanks

You've got more columns than column names there, which is right?

Fixed original post

You've still got 7 columns and 6 column names. Which is right?

I think this will work

#!/bin/ksh
executeLine(){
  line="$@" 
  ID=$(echo $line|awk -Ft '{print $1}')
  SERVER=$(echo $line|awk -Ft '{print $3}')
  AGE=$(echo $line|awk -Ft '{print $4}')
  LOCKED=$(echo $line|awk -Ft '{print $5}')

if [ $AGE -ge 60 && $LOCKED = "no"]
        then
                ssh $SERVER passwd -l $ID
        else
                echo "User ID $ID does not meet lock requirements, did not lock ID"
fi
}

echo "Enter UAAS file" 
read FILE
 
while read -r line
do
        executeLine $line
done

---------- Post updated at 02:56 PM ---------- Previous update was at 02:53 PM ----------

1 2 3 4 5 6
id desc server pass sudo lock
1 2 2 3 4 5 6
test Test user server01 67 no no

awk -F\\t '(($NF=="no")&&($(NF-2)>60)){sub(/.*/,"yes",$NF)}1' OFS=\\t infile

---------- Post updated at 09:41 PM ---------- Previous update was at 09:36 PM ----------

Oh ...
ok, i see :

awk -F\\t '(($NF=="no")&&($(NF-2)>60)){print $3,$1}' infile | while read svr uid
do
ssh $svr passwd -l $uid
done

---------- Post updated at 09:48 PM ---------- Previous update was at 09:41 PM ----------

$ cat tst
test01  Test user       server01        57      no      no
test02  Test user       server02        67      no      no
test03  Test user       server03        57      no      no
test04  Test user       server04        97      no      yes
test05  Test user       server05        60      no      no
test06  Test user       server06        67      no      no
test07  Test user       server07        88      no      no
test08  Test user       server08        57      no      no
test09  Test user       server09        57      no      no
test10  Test user       server10        99      no      no
$ awk -F\\t '(($NF=="no")&&($(NF-2)>60)){print $3,$1}' tst | while read a b; do echo "ssh $a passwd -l $b"; done
ssh server02 passwd -l test02
ssh server06 passwd -l test06
ssh server07 passwd -l test07
ssh server10 passwd -l test10
$

... if you want to run it, just remove the echo part : change

echo "ssh $a passwd -l $b"

into

ssh "$a" passwd -l "$b"