I suspected an issue like this. Which means the user has to input almost as many commands. While I'm at asking you questions (wheels ticking for this script), is there any alternative to the rootsh command? sudo is so unreliable (given OpenSSH and others forcing a password on to root) and I'm running rootsh v1.5 for that exact reason. And there isn't, how can you use root (or sudo gainroot) and then return to being regular user?