Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Oct 2005 14:58:55 +0200 (CEST)
From:      Erik Norgaard <norgaard@math.ku.dk>
To:        Olaf Greve <o.greve@axis.nl>
Cc:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: Weird SSH problem... Any ideas?!?
Message-ID:  <Pine.LNX.4.64.0510201456310.20014@shannon.math.ku.dk>
In-Reply-To: <43578CD9.9020309@axis.nl>
References:  <435767E5.7020002@axis.nl> <Pine.LNX.4.64.0510201218070.18028@shannon.math.ku.dk> <43578CD9.9020309@axis.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 20 Oct 2005, Olaf Greve wrote:

> I do notice something weird though, which I also noticed from a warning 
> Amavisd-new has given me: for some reason unpriviliged users do not seem to 
> "see" their login name, but rather only their UID, when performing a "whoami" 
> call?!?

Seems to be related

> For my account that's in the wheel group and for the root account "whoami" 
> properly returns the right name, but other users only see their UID. Any 
> ideas why that can be, and if that can be fixed as well?
>
>> Also try:
>> lastlog <user that cannot login>
>
> Hmmm, there is no binary called 'lastlog' on my system. There is 
> /usr/sbin/lastlogin though, so I'm assuming that is the one you referred too?
>
> Well, when calling that function with the user name, or the matching ID, it 
> results in the following:
> lastlogin 1026
> lastlogin: user '1026' not found

Well, it all seems to be a question of granting users access to 
the right file. Have you checked permissions on /etc/passwd and 
/etc/pwd.db ?

These should be world readable while /etc/master.passwd and 
/etc/spwd.db should not.

Non privileged processes access the former to convert UID to user 
name.

Cheers, Erik



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.64.0510201456310.20014>