Summary: Set User ID Bit doesn't work on Solaris 2.5

From: Mark Hargrave (
Date: Fri Dec 13 1996 - 12:23:12 CST

Special thanks to all who responded to this problem!


Troy Wollenslegel <>
Martin Espinoza <>
"Karl E. Vogel" <>
Casper Dik <casper@holland.Sun.COM>
Super-User <> (James Coby) (DON FREELEY)

Sorry if I missed someone.


1. Solaris does not allow SetUID for C-Shell scripts.

2. Use a C program, that is setuid to root, that calls the script.
   (See example below)

3. Use "sudo" to call the program.

4. Use ksh instead of csh. (That seemed to work also)

I decided to use "sudo" which worked great.

Thanks again for all the help!!

Thanks, Mark

  Mark Hargrave, Sr. Unix Systems Manager
  Lockheed Martin Manned Space Systems
  New Orleans, LA 70189

Example C program that calls a script
#include <stdio.h>
#include <string.h>
#define begin_program {
#define then {
#define loop {
#define when {
#define end_program }
#define end_if }
#define end_loop }
#define end_switch }
main ()
   char buffer[256];
   strcpy ( buffer, "/myscript" );
   system ( buffer );

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:18 CDT