Date: Wed, 8 Mar 2006 00:37:00 +0200 From: "Cole" <cole@opteqint.net> To: <freebsd-hackers@freebsd.org> Subject: RE: tty's and no login Message-ID: <20060307223708.76C4C43D45@mx1.FreeBSD.org> In-Reply-To: <440E0909.1010305@palisadesys.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060307223708.76C4C43D45>