[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Man gets to be su?

On Sun, Feb 20, 2000 at 03:37:33PM +0100, Fredrik Liljegren wrote:
> I had an interresting experience today.  When requesting a manpage, it asked
> me for my password!  Well, the man-command thought it was su!  Heres what
> is:


> Well, as a user "man" was just "man", but after my su "man" became "su"!! A
> "which man" returns "/usr/bin/man", and typing the command with full path is
> the same.
> I am logged on thru ssh.. I haven't noticed anything else this strange...
> I don't even know where to send a bug-report!

is your man package fully up to date?  (ie version 2.3.10-71) 

your /usr/bin/man should look like this:

[eb@plato eb]$ cat `which man`
#!/bin/sh -e
pgm=`basename $0`
cmd="${edir}/${pgm} ${1+$@}"
[ `id -u` = 0 ] || exec ${cmd}
su nobody -c "/bin/true" && exec su nobody -c "$cmd"
su -s /bin/true 2>/dev/null && exec su -s /bin/sh nobody -c "$cmd"
exec su man -c "$cmd"
[eb@plato eb]$

if it does, then there is something still wrong with this wrapper
script, but i don't see what it is... (this script avoids man being
run as root in response to a security concern)

Ethan Benson

Reply to: