The operator for 'greater or equal' in awk is '>=' not '<='.
The /etc/passwd file is ':' delimited, so you must specify this delimiter when you access it with awk :
awk -F: '$2 >= 500 { print $1 }' /etc/passwd
If a command that list users exists on you system (for example 'lsuser' on AIX), use it instead of reading the passwd file.
Your var3 assignment will not work.
You must use backward quote '`' or '$( )' construct.
Your grep command haven't input file specified, so stdin will be used.
var3=$(grep "^$deluser:" /etc/passwd | grep -d: -f3)
var3=$(awk -F: '$1 == User {print $3}' User="=deluser" /etc/passwd)
A solution for locking the home directory is to change its owner to root, and set acces to 400.
You can also rename the home directory.