how to change the effective user identficator

Discussion in 'Perl' started by Daneel Yaitskov, Jul 20, 2008.

  1. Hi,


    I can't change the EUID of a perl process which performs a perl script.
    I used the manual perlsec and wrote the script:

    #!/usr/bin/perl

    use English '-no_match_vars';

    $EUID = 0;
    open(THEFILE, ">/var/log/messages") || die "can't open file";
    print "The file was opened\n";
    #end of the script

    The script file has the rights:
    $chown root:root test.pl
    $chmod a+xs test.pl
    The script gives the error "can't open file"


    Daneel
     
    Daneel Yaitskov, Jul 20, 2008
    #1
    1. Advertising

  2. [Forwarding to CLPM because CLP is obsolete]

    Daneel Yaitskov <> wrote:
    >I can't change the EUID of a perl process which performs a perl script.
    >I used the manual perlsec and wrote the script:
    >
    >#!/usr/bin/perl
    >
    >use English '-no_match_vars';
    >
    >$EUID = 0;
    >open(THEFILE, ">/var/log/messages") || die "can't open file";
    >print "The file was opened\n";
    >#end of the script
    >
    >The script file has the rights:
    >$chown root:root test.pl
    >$chmod a+xs test.pl
    >The script gives the error "can't open file"
    >
    >
    >Daneel
     
    Jürgen Exner, Jul 20, 2008
    #2
    1. Advertising

  3. [Forwarding to CLPM because CLP is obsolete]

    Daneel Yaitskov <> wrote:
    >I can't change the EUID of a perl process which performs a perl script.
    >I used the manual perlsec and wrote the script:
    >
    >#!/usr/bin/perl
    >
    >use English '-no_match_vars';
    >
    >$EUID = 0;
    >open(THEFILE, ">/var/log/messages") || die "can't open file";
    >print "The file was opened\n";
    >#end of the script
    >
    >The script file has the rights:
    >$chown root:root test.pl
    >$chmod a+xs test.pl
    >The script gives the error "can't open file"
    >
    >
    >Daneel
     
    Jürgen Exner, Jul 20, 2008
    #3
  4. Jürgen Exner wrote:
    > [Forwarding to CLPM because CLP is obsolete]



    I don't know what is CLPM. I didn't find definition of CLPM or CLP in
    manuals: perl, perltoc and perldoc CLPM. Please, hint where can I read
    about it.



    Daneel
     
    Daneel Yaitskov, Jul 20, 2008
    #4
  5. Jürgen Exner wrote:
    > [Forwarding to CLPM because CLP is obsolete]



    I don't know what is CLPM. I didn't find definition of CLPM or CLP in
    manuals: perl, perltoc and perldoc CLPM. Please, hint where can I read
    about it.



    Daneel
     
    Daneel Yaitskov, Jul 20, 2008
    #5
  6. Daneel Yaitskov <> wrote:
    >Jürgen Exner wrote:
    >> [Forwarding to CLPM because CLP is obsolete]

    >
    >
    >I don't know what is CLPM. I didn't find definition of CLPM or CLP in


    comp.lang.perl.misc

    comp.lang.perl has been rmgroup'ed and replaced with the
    comp.lang.perl.* hierarchy over a decade ago.

    >manuals: perl, perltoc and perldoc CLPM. Please, hint where can I read
    >about it.


    perldoc -q usenet

    jue
     
    Jürgen Exner, Jul 20, 2008
    #6
  7. Daneel Yaitskov <> wrote:
    >Jürgen Exner wrote:
    >> [Forwarding to CLPM because CLP is obsolete]

    >
    >
    >I don't know what is CLPM. I didn't find definition of CLPM or CLP in


    comp.lang.perl.misc

    comp.lang.perl has been rmgroup'ed and replaced with the
    comp.lang.perl.* hierarchy over a decade ago.

    >manuals: perl, perltoc and perldoc CLPM. Please, hint where can I read
    >about it.


    perldoc -q usenet

    jue
     
    Jürgen Exner, Jul 20, 2008
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joe Buick

    Effective Email Marketing

    Joe Buick, Nov 29, 2004, in forum: VHDL
    Replies:
    0
    Views:
    468
    Joe Buick
    Nov 29, 2004
  2. Phill Tadman
    Replies:
    4
    Views:
    1,152
    Phill Tadman
    Oct 19, 2003
  3. vimala
    Replies:
    1
    Views:
    583
    Jack Klein
    Aug 1, 2003
  4. Daneel Yaitskov

    how to change the effective UID

    Daneel Yaitskov, Jul 20, 2008, in forum: Perl Misc
    Replies:
    6
    Views:
    203
    Dominique Dumont
    Jul 30, 2008
  5. JK
    Replies:
    1
    Views:
    110
    Thomas 'PointedEars' Lahn
    Nov 29, 2005
Loading...

Share This Page