help! ( run perldoc as root )

N

nan li

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
 
A

Anno Siegel

nan li said:
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
 
N

nan li

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

Nan
 
N

nan li

Tad said:
Yes.

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


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.
 
G

Guest

: 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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top