From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 7 22:37:08 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 BF75B16A420 for ; Tue, 7 Mar 2006 22:37:08 +0000 (GMT) (envelope-from cole@opteqint.net) Received: from elektra.opteqint.net (elektra.opteqint.net [209.25.178.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id 76C4C43D45 for ; Tue, 7 Mar 2006 22:37:08 +0000 (GMT) (envelope-from cole@opteqint.net) Received: from [196.47.3.46] (helo=deadmind) by elektra.opteqint.net with esmtpsa (TLSv1:RC4-MD5:128) (Exim 4.52 (FreeBSD)) id 1FGkor-000FWk-EZ for freebsd-hackers@freebsd.org; Tue, 07 Mar 2006 14:38:19 -0800 From: "Cole" To: Date: Wed, 8 Mar 2006 00:37:00 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcZCNqKVgTNC+JfdSH2YsbDL6V+UdAAAK4gg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-Reply-To: <440E0909.1010305@palisadesys.com> Message-Id: <20060307223708.76C4C43D45@mx1.FreeBSD.org> Subject: RE: tty's and no login X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: cole@opteqint.net 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:37:08 -0000 Yeah. That does help quite a lot. However, I did find something regarding this called own-tty, but that was for linux, and also written in like 1998. http://www.canonical.org/~kragen/sw/usershell.html I was actually hoping to do something similar. In that I was hoping to just write a single program to take control of the terminal and all me to use it for my input/output directly. Ive tried the above program, but it does complain about "TIOCSCTTY: Operation not permitted". Anyone have any ideas about what exactly needs to be done to get the own-tty.c program to function correctly under FreeBSD? Thanks though for your suggestion, I'll definately make use of it if I cant come right. /Cole -----Original Message----- From: Guy Helmer [mailto:ghelmer@palisadesys.com] Sent: Wednesday, March 08, 2006 12:28 AM To: cole@opteqint.net Cc: freebsd-hackers@freebsd.org Subject: Re: tty's and no login 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.