From owner-freebsd-questions@FreeBSD.ORG Tue Apr 13 22:10:46 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7BE6F16A4CE for ; Tue, 13 Apr 2004 22:10:46 -0700 (PDT) Received: from lakermmtao06.cox.net (lakermmtao06.cox.net [68.230.240.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id D7EE043D60 for ; Tue, 13 Apr 2004 22:10:45 -0700 (PDT) (envelope-from micheal@tsgincorporated.com) Received: from router.caverns.us.eu.org ([68.227.96.223]) by lakermmtao06.cox.netESMTP <20040414051044.PVPX2585.lakermmtao06.cox.net@router.caverns.us.eu.org>; Wed, 14 Apr 2004 01:10:44 -0400 Received: from dredster ([192.168.1.2])i3E5AhuT038922; Wed, 14 Apr 2004 00:10:44 -0500 (CDT) (envelope-from micheal@tsgincorporated.com) Message-ID: <019201c421df$3c2cd050$0201a8c0@dredster> From: "Micheal Patterson" To: "Doug Hardie" , References: <20040413235143.4c2cb911@it.buh.cameradicommercio.ro> <035C9EBA-8DCA-11D8-958E-000393681B06@lafn.org> Date: Wed, 14 Apr 2004 00:13:31 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Subject: Re: Unusual login requirement X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2004 05:10:46 -0000 ----- Original Message ----- From: "Doug Hardie" To: Sent: Tuesday, April 13, 2004 11:12 PM Subject: Unusual login requirement > I am trying to figure out how to implement an unusual login requirement > and haven't found a good approach yet. What I need is to have a > specific user id that when it is logged in it executes a specific > script and then immediately logs out. Basically what it needs to do is > run a make that builds a CD from a bunch of files and then burns the > CD. Obviously a blank CD would need to be in the burner first. I > don't want a general login as this would be used by a person who should > not have access to the system. I just need him to be able to burn a CD > frequently. > > My first throught was to create a script and set it as the shell in the > passwd file and add it to /etc/shells. Is that the best approach? I > am not concerned about the user breaking out of the script as he is > trusted. I just don't want to create a regular user account for him. > The server is running FreeBSD 4.6. Thanks, > > -- Doug > If you use bash, you can create your script, start it in the .profile and have exit directly below it. That way, when the script finishes, it will exit out. Also, even though this is not a concern for you, this is a safeguard should they break out of the script, it kills the session too. -- Micheal Patterson Network Administration TSG Incorporated 405-917-0600