Weird SSH problem... Any ideas?!?

Erik Norgaard norgaard at math.ku.dk
Thu Oct 20 05:59:00 PDT 2005


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


More information about the freebsd-questions mailing list