From owner-freebsd-questions@FreeBSD.ORG Thu Dec 16 20:15:33 2004 Return-Path: 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 D923616A4DA for ; Thu, 16 Dec 2004 20:15:32 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id E0BB643D55 for ; Thu, 16 Dec 2004 20:15:13 +0000 (GMT) (envelope-from lodriguss@gmail.com) Received: by rproxy.gmail.com with SMTP id 40so3842rnz for ; Thu, 16 Dec 2004 12:15:12 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:x-sender:x-mailer:date:to:from:subject:in-reply-to:references:mime-version:content-type; b=NZ5Y56+DFlner6Dzd94qDjwugorRrZAlbtp+GaQUECNmswKhol8uxLu5aMtmju03JZCAG7j2ORV9cw4DrPn8edPXbygplhNW9anpOLzpRoYry6iGsp8cN/5w6gneuWuoSvVuNVHxyGpKA/XtusYeg8zGliha7z1q96q59UQGwPo= Received: by 10.38.206.35 with SMTP id d35mr250616rng; Thu, 16 Dec 2004 12:15:12 -0800 (PST) Received: from SH2415-3.gmail.com ([128.91.113.245]) by smtp.gmail.com with ESMTP id 62sm133755rna.2004.12.16.12.15.12; Thu, 16 Dec 2004 12:15:12 -0800 (PST) Message-Id: <6.1.1.1.2.20041216150800.0c54d358@pop.gmail.com> X-Sender: lodriguss@gmail.com@pop.gmail.com X-Mailer: QUALCOMM Windows Eudora Version 6.1.1.1 Date: Thu, 16 Dec 2004 15:15:14 -0500 To: freebsd-questions@freebsd.org From: Brandon Lodriguss In-Reply-To: <41C1D214.6080605@orchid.homeunix.org> References: <41C1D214.6080605@orchid.homeunix.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: user disappears from w and who X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Dec 2004 20:15:34 -0000 Hi, I still have not found a reason for this happening in this version of fbsd but not others. I am unsure if this is a bug or not. If anyone has an answer or a theory, it would be much appreciated. I do however have two workarounds if anyone is concerned about their users doing this little annoyance. One is editing /etc/login.access and allowing local logins only for yourself, or denying it for a user group. Another is changing permissions on /usr/bin/login so that only the owner (root) and possibly group (wheel) can execute it. I'm not sure if this would have any unintended side effects, but I've seen none so far... It seems like utmp/wtmp is getting updated when the user logs out of the second shell, then it ignores the fact that the user is still logged in to the original shell. Best regards, Brandon At 01:21 PM 12/16/2004, you wrote: >Hello, > >although I don't have an answer to this, I can confirm this happening >here, too (5.3-RELEASE-p2, ssh session): > > > login as: joe > > Password: > > Last login: Thu Dec 16 18:31:36 2004 > > [...snip...] > > > > joe$ who > > joe ttyp1 Dec 16 18:46 (192.168.1.66) > > > > joe$ w > > 6:41PM up 12 days, 3:18, 1 user, load averages: 0.26, 0.15, 0.10 > > USER TTY FROM LOGIN@ IDLE WHAT > > joe p1 name.of.a.box 6:41PM - w > > joe$ login > > login: joe > > Last login: Thu Dec 16 18:41:26 from name.of.a.box > > [...snip...] > > joe$ w > > 6:43PM up 12 days, 3:20, 1 user, load averages: 0.05, 0.10, 0.08 > > USER TTY FROM LOGIN@ IDLE WHAT > > joe p1 - 6:42PM - w > > joe$ who > > joe ttyp1 Dec 16 18:42 > >and now: > > joe$ exit > > joe$ w > > 6:44PM up 12 days, 3:21, 0 users, load averages: 0.07, 0.10, 0.08 > > USER TTY FROM LOGIN@ IDLE WHAT > > joe$ who > > joe$ > >and as root (right after): > > joe$ su > > Password: > > Yes, Master? w > > 7:06PM up 12 days, 3:43, 0 users, load averages: 0.08, 0.09, 0.08 > > USER TTY FROM LOGIN@ IDLE WHAT > > Yes, Master? who > > Yes, Master? sockstat -4 | grep joe > > joe sshd 91554 6 tcp4 192.168.1.1:22 192.168.1.66:1458 > > Yes, Master? ps aux | grep sshd | grep joe > > root 91551 0.0 2.0 6400 1812 ?? Is 11:52AM 0:00.10 sshd: > joe [priv] (sshd) > > joe 91554 0.0 2.1 6408 1916 ?? S 11:53AM 0:03.68 sshd: > joe@ttyp0 (sshd) > >last(1): > > Yes, Master? last joe > > joe ttyp1 192.168.1.66 Thu Dec 16 18:46 - > 18:51 (00:05) > > Yes, Master? date > > Thu Dec 16 19:15:25 CET 2004 > > > Yes, Master? uname -r > > 5.3-RELEASE-p2 > > >I can then make another ssh session to the box and that user is not >listed either. > >Regards, >Karol > >-- >Karol Kwiatkowski