Bugzilla – Bug 12
sudo -s gives a shell, despite restrictions in sudoers
Last modified: 2000-10-31 21:19:50 MST
Although I've restricted all shells in the sudoers file, a user may still get a shell by executing 'sudo -s' with no other arguments. This has been verified on Linux 2.2.16 with sudo 1.6.3p5 Solaris 2.6 w/sudo 1.5.9p2 NetBSD 1.4.2 w/sudo 1.6.3p5
There's nothing special about 'sudo -s'. Sudo just uses the contents of the SHELL environment variable (or failing that the shell from the password file) as the command. If 'sudo -s' works then 'sudo /path/to/shell' must as well.