From owner-freebsd-questions@FreeBSD.ORG Thu Oct 20 12:58:59 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E765116A420 for ; Thu, 20 Oct 2005 12:58:59 +0000 (GMT) (envelope-from norgaard@math.ku.dk) Received: from imf.math.ku.dk (fw.math.ku.dk [130.225.103.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7DD6B43D5A for ; Thu, 20 Oct 2005 12:58:59 +0000 (GMT) (envelope-from norgaard@math.ku.dk) Received: from imf.math.ku.dk (localhost [127.0.0.1]) by imf.math.ku.dk (Postfix) with ESMTP id DF47F250FC; Thu, 20 Oct 2005 14:58:55 +0200 (CEST) Received: from shannon.math.ku.dk (shannon.math.ku.dk [130.225.103.12]) by imf.math.ku.dk (Postfix) with ESMTP; Thu, 20 Oct 2005 14:58:55 +0200 (CEST) Date: Thu, 20 Oct 2005 14:58:55 +0200 (CEST) From: Erik Norgaard To: Olaf Greve In-Reply-To: <43578CD9.9020309@axis.nl> Message-ID: References: <435767E5.7020002@axis.nl> <43578CD9.9020309@axis.nl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-questions Subject: Re: Weird SSH problem... Any ideas?!? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2005 12:59:00 -0000 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 > > 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