From owner-freebsd-questions@FreeBSD.ORG Mon Mar 16 02:05:43 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBCCF106564A for ; Mon, 16 Mar 2009 02:05:43 +0000 (UTC) (envelope-from gs_stoller@juno.com) Received: from outbound-mail.dca.untd.com (outbound-mail.dca.untd.com [64.136.47.15]) by mx1.freebsd.org (Postfix) with SMTP id 8264F8FC18 for ; Mon, 16 Mar 2009 02:05:43 +0000 (UTC) (envelope-from gs_stoller@juno.com) X-UOL-TAGLINE: true Received: from outbound-bu1.dca.untd.com (webmail05.dca.untd.com [10.171.12.145]) by smtpout02.dca.untd.com with SMTP id AABE55MPFAPSVPJJ for (sender ); Sun, 15 Mar 2009 18:38:45 -0700 (PDT) X-UNTD-OriginStamp: /s5f1SIGSI3+WdnoYQ8yRBRH/vhMDqtHijRsTlTu9nYRRaL9tomJFg== Received: (from gs_stoller@juno.com) by webmail05.dca.untd.com (jqueuemail) id PBQ5WVC9; Sun, 15 Mar 2009 18:38:09 PDT Received: from [96.232.136.252] by webmail05.dca.untd.com with HTTP: Mon, 16 Mar 2009 01:36:48 GMT X-Originating-IP: [96.232.136.252] Mime-Version: 1.0 From: "gs_stoller@juno.com" Date: Mon, 16 Mar 2009 01:36:48 GMT To: mister.olli@googlemail.com, steve@ibctech.ca X-Mailer: Webmail Version 4.0 Message-Id: <20090315.213648.1254.1@webmail05.dca.untd.com> X-ContentStamp: 2:1:23810649 X-UNTD-Peer-Info: 10.171.12.145|webmail05.dca.untd.com|outbound-bu1.dca.untd.com|gs_stoller@juno.com Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd@edvax.de, freebsd-questions@freebsd.org Subject: Re: Execute and lock a user into a program upon login X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Mar 2009 02:05:44 -0000 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/