[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Scripting question



I am trying to write a script for a couple of novice admins that changes
shell to bash from false, logs in, runs elm from where they can purge
certain emails from a users mailbox and then exit to change the shell back
to false. So far I have:

#!/bin/bash
USR=$1
usermod -s /bin/bash $USR
su - $USR
elm
usermod -s /bin/false $USR

but when the su - changes accounts the script stops, any help appreciated.

Regards
Nathan 



Reply to: