From owner-freebsd-questions@FreeBSD.ORG Sat Feb 5 14:56:37 2005 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 F28C616A4CE for ; Sat, 5 Feb 2005 14:56:36 +0000 (GMT) Received: from smtphost.cis.strath.ac.uk (smtphost.cis.strath.ac.uk [130.159.196.96]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3370843D1D for ; Sat, 5 Feb 2005 14:56:36 +0000 (GMT) (envelope-from chodgins@cis.strath.ac.uk) Received: from [192.168.0.4] (chrishodgins.force9.co.uk [84.92.20.141]) j15EuNB0003336; Sat, 5 Feb 2005 14:56:24 GMT Message-ID: <4204DFB5.2030700@cis.strath.ac.uk> Date: Sat, 05 Feb 2005 15:01:09 +0000 From: Chris Hodgins User-Agent: Mozilla Thunderbird 1.0 (X11/20050204) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Loren M. Lang" References: <51563600.20050205125343@wanadoo.fr> <20050205130310.GM8619@alzatex.com> In-Reply-To: <20050205130310.GM8619@alzatex.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-CIS-MailScanner-Information: Please contact support@cis.strath.ac.uk for more information X-CIS-MailScanner: Found to be clean X-CIS-MailScanner-SpamCheck: not spam, SpamAssassin (score=0, required 6) X-CIS-MailScanner-From: chodgins@cis.strath.ac.uk cc: freebsd-questions@freebsd.org Subject: Re: Running top without a shell -- more questions 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: Sat, 05 Feb 2005 14:56:37 -0000 Loren M. Lang wrote: > On Sat, Feb 05, 2005 at 12:53:43PM +0100, Anthony Atkielski wrote: > >>I've set up a user account that has top for its shell (instead of one of >>the standard shells). As expected, when I log into this account, I >>immediately find myself in top, and if I stop top, I'm instantly logged >>out. That's what I want. I use it to have a continuously running >>console status display without the need to be actually logged in to a >>(potentially dangerous) shell. >> >>However, I note that there is a login process under root that just sits >>there, and top runs as a child of that under my chosen user name. Is >>there a way to get top to run by itself, like csh or some other shell, >>with the login process out of the system? What causes login to go away >>in the normal case, when the shell is actually a shell program? Isn't >>the user fully logged in by the time control passes to top? > > > Right now I have two login processes running, one for each virtual > console I am logged in at the moment, though my ssh login shells don't > have any login processes for them. My guess is that there staying > around for some cleanup work to do at logout. I think it might be > related to the pam session management modules like changing certain file > permissions when a shell logs in and out and it just happens that only > my virtual consoles need to do any cleanup jobs. If it is pam doing it, > you might be able change it's configuration, but I don't think it's a > big deal security wise. > I think the login program forks your shell and then sits and waits for the shell to exit. Chris