badmrfrosty has asked for the wisdom of the Perl Monks concerning the following question:

Greetings wise monks, I have a very frustrating issue. I am upgrading my mail server from Redhat 6.2 to Redhat 9. I have some old legacy perl scripts that do some pretty invaluable functions that I would like to retain, the problem however is that no matter how hard I try, these scripts will not suid.

This is the info:

bash-2.05b$ ls -la create

-rwsr-xr-x 1 root root 1176 Jun 16 21:13 create

~~ permissions seem correct!

bash-2.05b$ whoami

nobody

~~ shouldnt be a problem, right?

bash-2.05b$ ./create

Can't do setuid

~~ it says in the perldoc that if you get this error that /usr/bin/suidperl doesnt exist.

bash-2.05b$ ls -la /usr/bin/suidperl

-rwsr-sr-x 2 root root 531516 Jun 16 20:37 /usr/bin/suidperl

~ouch.

I have to say Im kind of clueless at this point, this is how I am calling the script

#! /usr/bin/suidperl, I have also tried #! /usr/bin/suidperl -T, #! /usr/bin/perl -T, #! /usr/bin/suidperl -TU, et cetera.

This just isnt working. Redhat 9 has a RPM file for suidperl, so I imagine at some point they intended it to be possible to do this.

By the way, the script works excellent if i run it as root. Thanks, -Drew

Replies are listed 'Best First'.
Re: suidperl /w redhat 9
by fglock (Vicar) on Jun 17, 2003 at 02:31 UTC

    See Security Vulnerability Closed.
    It is not installed by default, due to security issues.

    further security vulnerabilities are, unfortunately, always possible. The suidperl code is being reviewed and if deemed too risky to continue to be supported, it may be completely removed from future releases. In any case, suidperl should only be used by security experts who know exactly what they are doing and why they are using suidperl instead of some other solution such as sudo ( see http://www.courtesan.com/sudo/ ).