Date: Mon, 16 Mar 2009 01:36:48 GMT From: "gs_stoller@juno.com" <gs_stoller@juno.com> To: mister.olli@googlemail.com, steve@ibctech.ca Cc: freebsd@edvax.de, freebsd-questions@freebsd.org Subject: Re: Execute and lock a user into a program upon login Message-ID: <20090315.213648.1254.1@webmail05.dca.untd.com>
next in thread | raw e-mail | index | archive | help
And I think the cleanest solution would be to link .login to vtysh , = make sure that your system logs out when it finishes this command or you= can't use this technique. Steve Bertrand wrote (earlier today): > I think the cleanest solution would be to create a match block for you= r > user, and apply the forcecommand within that block... > -- > Olli > On Fr, 2009-03-13 at 21:50 -0400, Steve Bertrand wrote: >> 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 wi= ll >> > 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 a= stray. >> = >> Your procedure will allow me to put the user in the wheel group for n= ow, >> knowing that logout will occur as soon as the program terminates. Thi= s >> way, I can safely know it works, and make myself a note for Monday to= >> fix the permissions issues ;) >> = >> Regards, >> = >> Steve ____________________________________________________________ Looking for insurance? Compare and save today. Click here. http://thirdpartyoffers.juno.com/TGL2141/fc/BLSrjpTInoLb38jeH2ZxV89B2QnR= 6ZNekJuaR3qGCHLhnMekVw3DI3haDtu/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090315.213648.1254.1>