sudo problem with csh

Matthew.Hannigan at nl.abnamro.com Matthew.Hannigan at nl.abnamro.com
Fri Mar 31 05:30:24 EST 2000




Todd,

Nice guess, but no.  I've confirmed this.  It's bizarre.
See below.

My guess it's a side-effect of the program hashing that
csh does.  Perhaps it attempts to chdir or ls
directories in it's PATH before hashing them.

-Matt


$ echo $PATH
/usr/bin:/opt/sudo/bin
$ sudo
usage: sudo -V | -h | -l | -v | -k | -H | [-b] [-p prompt] [-u username/#uid] -s
 | <command>
$ csh
% echo $PATH
/usr/bin:/opt/sudo/bin
% echo $path
/usr/bin /opt/sudo/bin
% sudo
sudo: Command not found.
%


-Matt









Todd.Miller at courtesan.com on 30/03/2000 18:26:04

To:   RWright at hussmann.com
cc:   sudo-users at courtesan.com (bcc: Matthew Hannigan/NL/ABNAMRO/NL)
Subject:  Re: sudo problem with csh



It sure sounds like /opt/sudo/bin is simply not in your $path.
Note that sh/ksh uses $PATH (colon separated) whereas csh uses $path
(a space separated list).

I bet if you do:
    set path = ( $path /opt/sudo/bin )

You will be able to just run 'sudo' instead of giving a full path.
On HP-UX the default path for csh is usually set in /etc/csh.login,
although that *should* pull in /etc/PATH.

 - todd

In message <BD8AC1BB8374D311A74200508B5A914F4651F0 at briexch01.hussmann.com>
     so spake "Wright, Richard" (RWright):

> I just installed sudo on my HP-UX 11.00 system. The sudo command works good
> when in ksh.
> In csh I have to type "/opt/sudo/bin/sudo" to get it to work. If I just type
> "sudo", I get a "not found" error. I can then enter "type sudo" and the full
> pathname is returned.
>
> I have verified my /etc/PATH.
> I have verified permissions on /opt/sudo/bin/sudo which are ---s--x--x root
> root.
>
> I have what I believe is a work around. I created a symbolic link with "ln
> -s /opt/sudo/bin/sudo /opt/sudo/sbin/sudo" and now it works. (NOTE: sbin vs.
> bin)  According to the "ln" man page, there is no problem with having 777
> permissions on the link.
> Quote from "man ln"...
> "Symbolic links are created with the ownership of the creator and the
> permissions are of the creator's current umask.  Once created, the symbolic
> link ownership and permissions will not change, since the  mode and
> ownership of the symbolic link is ignored by the system."
>
> Please let me know if you can shed some light on the cause of this problem,
> or if you have a solution or a better work around.
>
> Thanks
>
>
> Richard Wright
> Hussmann, Corp
>
> "The views, opinions, and judgments expressed in this message are solely
> those of the author. The message contents have not been reviewed or approved
> by my employer."
>
>
>








More information about the sudo-users mailing list