Re: set-uid on shell scripts in Solaris
Posted in 1994
} } } On other UNIX boxes I have worked on, setting the user id bit only works } on executable programs, not shell scripts. So your program would have to } be written in C or something. } } } Hi, } } } } Is there any difference in the way set-uid bit works in Solaris from SunOS? } } } } I need a shell script with set-uid, owned by root and to be executed by } } operators. I could not run that script, so I tried following simple script. } } } } ############################################################# } } cat /etc/shadow } } } } ############################################################ } } } } this script is owned by root, group other and the permissions are } } "rws r-s r-x". I could not cat /etc/shadow file through script, logged } } in as ordinay user. } } } } Any idea, suggestions welcome. Thanks. } } We have a script that is run by our make process to set permissions on all of the compiled objects. Since we never know who is going to run it - and it won't work unless the user has authority over all of the groups contributing, the shell is set to -rwsr-sr-x. (In other words we have a shell script that works using this method). If you are having problems catting through the script then make the script read stdin instead, like 'cat -'. j. _____________________________________________________________________________ Jack Parker | "A lawyer is a learned gentleman Hewlett Packard, BSMC Boise, Idaho, USA| who rescues your estate from your jparker@hpbs3645.boi.hp.com | enemies and keeps it for himself." (208) 396-5388 (W) (208) 384-1623 (H) | -Henry Broughman _____________________________________________________________________________ Any opinions expressed herein are my own and not those of my employers. _____________________________________________________________________________