Execute and lock a user into a program upon login

Steve Bertrand steve at ibctech.ca
Fri Mar 13 18:50:31 PDT 2009

Jonathan Chen wrote:
> 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.

Thank you.

This appears to be what I want.

I was trying it with the previous setup, but I had to put the user in
the wheel group. I haven't yet figured where permissions were going astray.

Your procedure will allow me to put the user in the wheel group for now,
knowing that logout will occur as soon as the program terminates. This
way, I can safely know it works, and make myself a note for Monday to
fix the permissions issues ;)



More information about the freebsd-questions mailing list