From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 7 22:28:28 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AFD9516A422 for ; Tue, 7 Mar 2006 22:28:28 +0000 (GMT) (envelope-from ghelmer@palisadesys.com) Received: from magellan.palisadesys.com (magellan.palisadesys.com [192.188.162.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5297943D46 for ; Tue, 7 Mar 2006 22:28:28 +0000 (GMT) (envelope-from ghelmer@palisadesys.com) Received: from [192.168.0.101] (71-214-209-133.desm.qwest.net [71.214.209.133]) (authenticated bits=0) by magellan.palisadesys.com (8.13.4/8.13.4) with ESMTP id k27MSMZY047787 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 7 Mar 2006 16:28:24 -0600 (CST) (envelope-from ghelmer@palisadesys.com) Message-ID: <440E0909.1010305@palisadesys.com> Date: Tue, 07 Mar 2006 16:28:25 -0600 From: Guy Helmer User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: cole@opteqint.net References: <20060307213436.A946843D5F@mx1.FreeBSD.org> In-Reply-To: <20060307213436.A946843D5F@mx1.FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Palisade-MailScanner-Information: Please contact the ISP for more information X-Palisade-MailScanner: Found to be clean X-Palisade-MailScanner-From: ghelmer@palisadesys.com Cc: freebsd-hackers@freebsd.org Subject: Re: tty's and no login X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Mar 2006 22:28:28 -0000 Cole wrote: > Hey > > Im not sure if this is the right list, but anyway, let me know if im wrong. > > What im trying to do is, have a custom program run on a specific tty. Say like ttyv4, or so. But I would like to do this without having to login to this ttyv. > So instead of being presented with a login option, I would like to be able to switch to ttyv4, and have it show me the output of the program that is running and using that terminal for output. > > So exactly where about do you go about doing something like this? Is there something already created to do this? > > On a physically-secured machine I have this setup for ttyv1 in /etc/ttys: ttyv1 "/usr/libexec/getty IPMonitor" cons25 on secure and then in /etc/gettytab I have this entry for IPMonitor: IPMonitor:\ :al=ipmonitor:tc=Pc: Next, I have a special user named "ipmonitor" that is locked out (the password field is set to *LOCKED* in master.passwd) but has a special login script, like this: ipmonitor:*LOCKED*:65499:65499::0:0:IP Monitor Screen:/home/ipmonitor:/home/ipmonitor/bin/monitor.sh Finally, the special login script for ipmonitor is this simple script: #!/bin/sh exec /usr/bin/systat -ip I've also used vidcontrol with the -s option in a script like this to grab the screen. Hope this helps, Guy -- Guy Helmer, Ph.D. Principal System Architect Palisade Systems, Inc.