help! ( run perldoc as root )

Discussion in 'Perl Misc' started by nan li, Mar 22, 2006.

  1. nan li

    nan li Guest

    Has any one had problem when running perldoc as root ?
    I have some embedded POD at the end of the file 'x.pl'.
    When I use my regular account, 'perldoc x.pl' is just fine.
    But when I switch to 'root', the same line above gives me
    'No documentation found for x.pl'.

    I found in the man page the following warning:

    Because perldoc does not run properly tainted, and is known
    to have security issues, when run as the superuser it will
    attempt to drop privileges by setting the effectiveand real IDs
    to nobody's or nouser's account, or -2 if unavailable. If it
    cannot relinquish its privileges, it will not run.

    I don't know if that is relevant.

    Thanks a lot,
    Nan
     
    nan li, Mar 22, 2006
    #1
    1. Advertising

  2. nan li

    Anno Siegel Guest

    nan li <> wrote in comp.lang.perl.misc:
    > Has any one had problem when running perldoc as root ?
    > I have some embedded POD at the end of the file 'x.pl'.
    > When I use my regular account, 'perldoc x.pl' is just fine.
    > But when I switch to 'root', the same line above gives me
    > 'No documentation found for x.pl'.
    >
    > I found in the man page the following warning:
    >
    > Because perldoc does not run properly tainted, and is known
    > to have security issues, when run as the superuser it will
    > attempt to drop privileges by setting the effectiveand real IDs
    > to nobody's or nouser's account, or -2 if unavailable. If it
    > cannot relinquish its privileges, it will not run.
    >
    > I don't know if that is relevant.


    It probably is. What are the permissions of x.pl? Can "nouser"
    read it?

    Anno
    --
    If you want to post a followup via groups.google.com, don't use
    the broken "Reply" link at the bottom of the article. Click on
    "show options" at the top of the article, then click on the
    "Reply" at the bottom of the article headers.
     
    Anno Siegel, Mar 22, 2006
    #2
    1. Advertising

  3. nan li

    nan li Guest

    Thank you. That is the problem. I checked the file permission, but
    forgot to check the permissions on the path.

    Nan

    Anno Siegel wrote:
    > nan li <> wrote in comp.lang.perl.misc:
    > > Has any one had problem when running perldoc as root ?
    > > I have some embedded POD at the end of the file 'x.pl'.
    > > When I use my regular account, 'perldoc x.pl' is just fine.
    > > But when I switch to 'root', the same line above gives me
    > > 'No documentation found for x.pl'.
    > >
    > > I found in the man page the following warning:
    > >
    > > Because perldoc does not run properly tainted, and is known
    > > to have security issues, when run as the superuser it will
    > > attempt to drop privileges by setting the effectiveand real IDs
    > > to nobody's or nouser's account, or -2 if unavailable. If it
    > > cannot relinquish its privileges, it will not run.
    > >
    > > I don't know if that is relevant.

    >
    > It probably is. What are the permissions of x.pl? Can "nouser"
    > read it?
    >
    > Anno
    > --
    > If you want to post a followup via groups.google.com, don't use
    > the broken "Reply" link at the bottom of the article. Click on
    > "show options" at the top of the article, then click on the
    > "Reply" at the bottom of the article headers.
     
    nan li, Mar 22, 2006
    #3
  4. nan li <> wrote:

    > Has any one had problem when running perldoc as root ?



    Yes.

    Why on earth would you need to run perldoc as root?


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Mar 22, 2006
    #4
  5. nan li

    nan li Guest

    Tad McClellan wrote:
    > nan li <> wrote:
    >
    > > Has any one had problem when running perldoc as root ?

    >
    >
    > Yes.
    >
    > Why on earth would you need to run perldoc as root?


    >
    > --
    > Tad McClellan SGML consulting
    > Perl programming
    > Fort Worth, Texas



    I need to run a perl script as root in order to do some system check.
    The script has some embedded documentation in POD and uses pod2usage to
    print it out. And it seems pod2usage
    uses perldoc underneath.
     
    nan li, Mar 27, 2006
    #5
  6. nan li

    Guest Guest

    nan li <> wrote:

    : I need to run a perl script as root in order to do some system check.
    : The script has some embedded documentation in POD and uses pod2usage to
    : print it out. And it seems pod2usage
    : uses perldoc underneath.

    Looking at its documentation surely doesn't require root priviledges, does
    it? su to some other user matching the file and path permissions, without
    root execution priviledges, and you should be able to read the documentation.

    Oliver.

    --
    Dr. Oliver Corff e-mail: -berlin.de
     
    Guest, Mar 29, 2006
    #6
    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. Replies:
    0
    Views:
    1,241
  2. Rick Osborn
    Replies:
    10
    Views:
    3,959
    Jon A. Cruz
    Feb 8, 2004
  3. hector
    Replies:
    5
    Views:
    413
    CBFalconer
    Dec 5, 2006
  4. Dan Jacobson

    root wants to use perldoc

    Dan Jacobson, Aug 23, 2003, in forum: Perl Misc
    Replies:
    2
    Views:
    129
    Dan Wilga
    Aug 26, 2003
  5. Ed Hennig
    Replies:
    12
    Views:
    272
    Tad McClellan
    Feb 16, 2006
Loading...

Share This Page