Running top without a shell -- more questions

Chris Hodgins chodgins at cis.strath.ac.uk
Sat Feb 5 06:56:37 PST 2005


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


More information about the freebsd-questions mailing list