Shell Script security ------------------------------------------------------------------------------- Completely reset the environment # Completely reset the calling users environment PATH=/usr/sbin:/bin export PATH unset `env | grep -v -- '^PATH=' | sed 's/=.*//'` cd /; umask 022 ------------------------------------------------------------------------------- > I would like to run a shell script which will ask me for the root's password > before allowing me to do some other administrative tasks. Once a correct > password is entered, the script will go on executing the next command > (instead of starting a root shell). When all tasks are done, it will > automatically log out of root shell and continue with the rest of the > script. Can someone please tell me if this is possible to achieve. If so, > how can it be done? Or is it too risky? It's allways risky, but OK, here goes: # first part of script here, say start up things, etc.... # next you want to do things in root su root <