SUID script requirements on AIX 5L and ksh93

0.00 avg. rating (0% score) - 0 votes

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:

Source of this information:

http://www.ibm.com/developerworks/aix/library/au-kornshell93.html#n

One thought on “SUID script requirements on AIX 5L and ksh93”

  1. 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]

Leave a Reply