Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Mar 2006 16:28:25 -0600
From:      Guy Helmer <ghelmer@palisadesys.com>
To:        cole@opteqint.net
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: tty's and no login
Message-ID:  <440E0909.1010305@palisadesys.com>
In-Reply-To: <20060307213436.A946843D5F@mx1.FreeBSD.org>
References:  <20060307213436.A946843D5F@mx1.FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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?440E0909.1010305>