make passwd grep an exact match

This commit is contained in:
Matthew Saunders Brown 2025-02-18 15:55:10 -08:00
parent 590fd23f40
commit 6046476e79

View File

@ -59,7 +59,7 @@ do
password="(unknown)"
fi
fi
shell=(`grep $username /etc/passwd|awk -F : '{ print $6 }'`)
shell=(`grep ^$username: /etc/passwd|awk -F : '{ print $6 }'`)
if [[ $shell = "/usr/jails/$username/./home/$username" ]]; then
jailed="Yes"
else