Subject: Re: su troubles
To: Brian Carroll <carroll@ultdev.chess.cornell.edu>
From: Colin Wood <cwood@ichips.intel.com>
List: port-mac68k
Date: 02/10/1998 09:35:06
Brian Carroll wrote:

> I'm having troubles with su.  I don't seem able to su to any account
> unless I login as root.  I can't even su into the account I'm already
> logged into.  When I do "su someusername" it prompts me for a password and
> when I give it the correct password I get a "Sorry".  Su-ing from root to
> another account works peachy.  It sounds like a permission problem to me.
> Here is the permissions set for su and passwd(which I assume su reads):
> 
>  -r-xr-xr-x  1 root  wheel  16384 Jan 21 17:40 su
>  -rw-r--r--  1 root  wheel  728 Feb 10 11:48 passwd

Actually, su would have to read /etc/master.passwd since that's where the
actual passwords are located.
 
> So it looks like I should be able to execute su and read the passwd file.
> Are there any other files I should be looking at?  

Since /etc/master.passwd is only readable by root, this might be the
problem.  It looks to me like you didn't install your binaries correctly.
I could be wrong, but on NetBSD systems, most binaries are owned by user
bin and group bin, so yours is probably wrong.  Ah, here is the copy of
'su' from the NetBSD CVS server:

24 -r-sr-xr-x  1 root  bin  12288 Jan 30 00:01 /usr/bin/su

Note that it is owned by root:bin and that it is setuid root.  That
explains your problem.  If you installed from within NetBSD (which it
appears that you did, the Installer should give the correct permissions),
you need to reinstall with the -p option to tar. This will "preserve"
permissions on the files as you unarchive them.

I hope this helps.

Later.

-- 
Colin Wood                                 cwood@ichips.intel.com
Component Design Engineer - MD6                 Intel Corporation
-----------------------------------------------------------------
I speak only on my own behalf, not for my employer.