tty's and no login
Guy Helmer
ghelmer at palisadesys.com
Tue Mar 7 22:28:28 UTC 2006
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.
More information about the freebsd-hackers
mailing list