Subject: Re: passwd fails for users not in wheel group
To: Berndt Josef Wulf <wulf@dingo.ping.net.au>
From: Laine Stump <lainestump@rcn.com>
List: netbsd-help
Date: 03/20/2001 19:29:07
Berndt Josef Wulf <wulf@dingo.ping.net.au> writes:

> Laine Stump wrote
> > I *must* be overlooking something really stupid... (another problem
> > I've been having just came to my mind - for some reason, when I ftp
> > from this machine, it always suggests the username "root" instead of
> > my own username. I wonder if the two problems might be somehow
> > related...)
> 
> Do you login as root first and then change the user with su?

Nope. I'm not evil! ;-)

This is something that began happening sometime after I started
building my own system binaries. I have a feeling that I did something
strange during one of my manual upgrades of /etc or something.

The odd thing is that "id" shows everything as expected, as does
printing out $< (uid) and $> (euid) in perl.

> e.g.:
> 
> # su wulf
> # su -l wulf     # same as su - wulf
> 
> If so, it will exhibit the behaviour you described above.
> 
> I consider this to be a bug especially when using the -l that
> requests a full login.
> 
> From the su man-page
> -l      Simulate a full login.  The environment is discarded except
> 	for HOME, SHELL, PATH, TERM, USER, and SU_FROM.  HOME SHELL,
> 	and SU_FROM are modified as above.
> 
> Any comments?

Sounds like a reasonable expectation to me. But then I don't consider
myself an expert on the semantics of su ;-)

(After all, I still can't even make /usr/bin/passwd work for users who
aren't in wheel! :-P)