From owner-freebsd-questions@FreeBSD.ORG Thu Oct 20 12:26:12 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 2031C16A41F for ; Thu, 20 Oct 2005 12:26:12 +0000 (GMT) (envelope-from o.greve@axis.nl) Received: from yggdrasil.interstroom.nl (yggdrasil.interstroom.nl [80.85.129.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B80243D5A for ; Thu, 20 Oct 2005 12:26:11 +0000 (GMT) (envelope-from o.greve@axis.nl) Received: from ip127-182.introweb.nl ([80.65.127.182] helo=[192.168.1.42]) by yggdrasil with asmtp (Exim 3.35 #1 (Debian)) id 1ESZUg-0004ke-00 for ; Thu, 20 Oct 2005 14:26:02 +0200 Message-ID: <43578CD9.9020309@axis.nl> Date: Thu, 20 Oct 2005 14:26:01 +0200 From: Olaf Greve User-Agent: Mozilla Thunderbird 1.0.7-1.4.1.centos4 (X11/20051007) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions References: <435767E5.7020002@axis.nl> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-MailScanner-Information: Interstroom virusscan, please e-mail helpdesk@interstroom.nl for more information X-MailScanner-SpamCheck: 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:26:12 -0000 Hi, > Some things to try, in sshd_config set: > > PrintLastLog=no > LogLevel=DEBUG Tnx a lot, this did the trick!!! I first tried it without the "PrintLastLog no" command, and with a proper AllowUsers line and that still didn't allow the login over SSH. Then, adding that "PrintLastLog no" line (and again restarting SSHD) indeed did the trick! 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?!? 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? > try toggling with AllowGroups and AllowUsers this is good for security > also as you can deny system users or groups login and restrict users > to login only from specific hosts, see the manpage for more options. No luck, but I was going to do this anyway, so that addition has been made too now. > 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 However, when calling the same stuff (using the user names) as root, I do see entries perfectly well... >> -This does not happen when "su -" ing to the user's account from the >> box itself. > > > Note, there is a differens between su'ing and logging in. Can you > login? Dunno. My machine is located at a server farm and at present I cannot physically step behind it to do a console login, so I have to rely on SSH for logging in. Alright, so the issue in itself has been resolved, but I would like to see this "whoami" issue (if indeed it is an issue) fixed. Anyone any ideas on that one? Cheers! Olafo