From owner-freebsd-chat Sat Jan 6 05:53:13 1996 Return-Path: owner-chat Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id FAA22367 for chat-outgoing; Sat, 6 Jan 1996 05:53:13 -0800 (PST) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id FAA22341 for ; Sat, 6 Jan 1996 05:53:08 -0800 (PST) Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id OAA09155; Sat, 6 Jan 1996 14:52:05 +0100 Received: by sax.sax.de (8.6.11/8.6.12-s1) with UUCP id OAA14259; Sat, 6 Jan 1996 14:52:04 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.7.3/8.6.9) id OAA13251; Sat, 6 Jan 1996 14:14:28 +0100 (MET) From: J Wunsch Message-Id: <199601061314.OAA13251@uriah.heep.sax.de> Subject: Re: BASH shell script question.. To: freebsd-chat@freebsd.org Date: Sat, 6 Jan 1996 14:14:28 +0100 (MET) Cc: JSINNOTT@pomona.edu Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <9601060555.AA08315@emu.fsl.noaa.gov> from "Sean Kelly" at Jan 5, 96 10:55:41 pm X-Phone: +49-351-2012 669 X-Mailer: ELM [version 2.4 PL23] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-chat@freebsd.org Precedence: bulk As Sean Kelly wrote: > > Yes. Just make the script the login shell in the password file for > the user in question. As root, use vipw or chpass -s to change the > login shell to the full pathname of the script. Make sure the script ^^^^^^^^^^^^^^^^^^^^ > is executable. That's it. ^^^^^^^^^^^^^^ This translates into ``the script must be an "interpreted executable"''. I.e., you have to use #!/usr/local/bin/bash as the first line of your script, in addition to setting the appropriate x-permissions. Without this, execve(2) won't accept the script as an executable program. (For a normal shell environment, this is the point where your login shell jumps in and feeds the script into some sort of a shell. This doesn't work for a login program however.) -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)