Requirements for a suid script include:
- #! directing the KornShell be used
- Executable by user, group, and other
- No read permission
- Add suid permission by chmod u+s on the file
Add a -p option to #! to increase security to force a separate process if one is not normally done.
Example:
1 |
#! /usr/bin/ksh -p |
Source of this information:
http://www.ibm.com/developerworks/aix/library/au-kornshell93.html#n
have you ever tried this? I am trying to execute a script as a different user.
owner-id> ls -l
-rws–x–x 1 owner-id group-id 673 Dec 6 16:06 export.sh
owner-id> cat export.sh
#! /usr/bin/ksh93
backup scripts inside here
other-id> ./export.sh
./export.sh: ./export.sh: cannot open [Permission denied]
other-id> /usr/bin/ksh93 export.sh
export.sh: export.sh: cannot open [Permission denied]