Can't su anymore

Philip Mötteli Philip.Moetteli at tele2.ch
Wed Feb 27 23:05:07 PST 2008


Am 27.02.2008 um 19:16 schrieb José Pedro do Amaral:
>
> Em 27/02/2008, às 09:49, Philip Mötteli escreveu:
>
>> Am 27.02.2008 um 16:35 schrieb John Musbach:
>>
>>> On Tue, Feb 26, 2008 at 11:21 PM, Philip Mötteli
>>> <Philip.Moetteli at tele2.ch> wrote:
>>>> It works!
>>>> But why? I mean, 'which' gives exactly the same file.
>>>
>>> Can you paste the output of "echo $PATH" please?
>>
>> $ echo $PATH
>> /sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/moetteli:/usr/ 
>> local/bin:/usr/X11/bin:/Users/moetteli/bin:/usr/X/bin:/usr/X11R6/bin
>
> Those pesky /sw/bin and /sw/sbin take precedence, and I guess that  
> the non-system su is in one of them...

There's no other su:

	$ whereis su
	/usr/bin/su


I can also test this with 'locate':

	$ locate bin/su
	/usr/bin/su
	/usr/bin/sudo
	/usr/bin/sum


Another proof is 'which', which shows me, which 'su' is actually  
chosen by the shell:

	$ which su
	/usr/bin/su


> You may edit your shell configuration file and add an alias for su  
> to /usr/bin/su. That will fix it without thinking too much about  
> Fink or your PATH.

Done.



More information about the MacOSX-admin mailing list