The utility sudo runs executables as root or another user. The command cd is not an executable, it is command that is built into the shell so you can not run it via sudo. [by hawkmage]
I'm trying to devise a new sudoers configuration while building a new SOE and would like to force everyone (including system administrators) to use rootsh in favour of doing things like sudo -s, sudo bash, sudo tcsh and so forth. Effectively, use sudo to use any shell other than rootsh.
Is there a way to allow users to run anything they want except shells.
I have a script run from a non-privaleged users' crontab that invokes some commands using sudo. Except it doesn't. The script runs fine but the sudo'ed commands silently fail.
The script runs perfectly from a shell as the user in question.
Sudo does not require a password. The user in question has (root) NOPASSWD: ALL access granted in /etc/sudoers.
Cron is running and executing the script.