in reply to Calling a setuid script in a perl script
in thread Perl Setuid - Oracle Password Hardcoding

This is exactly the same problem you have already posted as Perl Setuid - Oracle Password Hardcoding. You were told to use sudo. You were told that this is not a perl problem, but a unix problem.

Why do you start a new thread?

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
  • Comment on Re: Calling a setuid script in a perl script

Replies are listed 'Best First'.
Re^2: Calling a setuid script in a perl script
by hmadhi (Acolyte) on Nov 21, 2011 at 05:07 UTC

    Apologies, You are correct. However I also needed to know how to pass a value from one script to another. I am indeed now going to use sudo.

    This is the error I get sudo: sorry, you must have a tty to run sudo

      the problem is that sudo requires a tty to run. You will not be able to run sudo on a crontab or cgi.

        sudo requires a tty to run

        Are you sure? My sudo (unmodified Slackware64-13.37, i.e. unmodified sudo-1.7.4p6) does not require a tty or an askpass helper program when configured that way.

        You will not be able to run sudo on a crontab or cgi.

        Well, my system allows sudo from CGI. The CGI user is explicitly allowed to invoke a selected program via sudo, without a password.

        Alexander

        --
        Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

      Thanks. I am using: Red Hat Enterprise Linux Server release 5.7 (Tikanga). Will check why