Execute and lock a user into a program upon login

Jonathan Chen jonc at chen.org.nz
Fri Mar 13 18:45:41 PDT 2009


On Sat, Mar 14, 2009 at 02:18:27AM +0100, Polytropon wrote:

[..]
> If the user's shell is csh (FreeBSD's standard dialog shell), you
> could achieve the goal:
> 
> 	~/.login
> 	vtysh
> 	logout
> 
> Only problem: I don't know how the shell will act when the user
> terminates the vtysh application (^C)...

Change the contents of ~/.login to:

    exec vtysh

This overlays the shell with "vtysh". When it exits, the session will
be closed.
-- 
Jonathan Chen <jonc at chen.org.nz>
------------------------------------------------------------------------
"We laugh in the face of danger, we drop icecubes down the vest of fear"
                                                 - Edmond Blackadder III


More information about the freebsd-questions mailing list