For Programmers: Free Programming Magazines  


Home > Archive > PERL Miscellaneous > March 2006 > help! ( run perldoc as root )









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author help! ( run perldoc as root )
nan li

2006-03-22, 7:01 pm

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

Anno Siegel

2006-03-22, 7:01 pm

nan li <nan.li.g@gmail.com> 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

2006-03-22, 7:02 pm

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 <nan.li.g@gmail.com> wrote in comp.lang.perl.misc:
>
> 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.


Tad McClellan

2006-03-22, 7:02 pm

nan li <nan.li.g@gmail.com> 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
tadmc@augustmail.com Perl programming
Fort Worth, Texas
nan li

2006-03-27, 7:00 pm


Tad McClellan wrote:
> nan li <nan.li.g@gmail.com> wrote:
>
>
>
> Yes.
>
> Why on earth would you need to run perldoc as root?


>
> --
> Tad McClellan SGML consulting
> tadmc@augustmail.com 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.

2006-03-29, 7:00 pm

nan li <nan.li.g@gmail.com> 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: corff@zedat.fu-berlin.de
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com