Linnorm,
This script works great. I had to add a wait command at the begining of the invalid_user subroutine otherwise it wouldn't print out the message for some reason.
I counldn't use sudo, but created an account with root permission and changed their shell in the passwd file to the directory and path of the script.
It all seems to be working great. I've kicked the tires and tried to break it, but I can only change passwords and can't access anything else in the system.
Thanks a million!
- Stinney
Favorite all too common vendor responses: "We've never seen this issue before." AND "No one's ever wanted to use it like that before.