[tech] Serial terminals in the hallway

Nick Bannon nick at ucc.gu.uwa.edu.au
Mon Mar 12 23:43:43 AWST 2018


On Thu, Sep 29, 2011 at 06:43:49PM +0800, Nick Bannon wrote:
> On Thu, Sep 29, 2011 at 05:42:16PM +0800, Luke Williams wrote:
> > Merlo is a wheel-only box at the moment. There are a few different
> > options for opening the serial terminals to members:
> > - Remove the login restrictions.
> 
> That's a pretty good option. It's already a LDAP client, which suprised
> me, but I guess dispsrv as it stands needs that. I'd like to see what it
> takes to make it work standalone if the network was down.
[...]

AD, now:
root at merlo:/# grep passwd /etc/nsswitch.conf 
passwd:         compat winbind
root at merlo:/# getent passwd |wc -l
1298

> > - Create a restricted login environment on merlo (eg: a VM with serial
> > passthrough)
> Maybe, or something like (thanks [DAA]!):
> meersau:/opt/ltsp/i386/usr/share/ltsp/screen.d/ssh
> 
> > - Send the serial data somewhere else.
[...]

Currently that's a little script: /usr/local/bin/serial-connect
#! /bin/sh
set -x
export TERM=vt510
clear
stty igncr
# This doesn't work if a default system locale is set
# on the target system - thanks Unix.
export LANG=en_AU
while [ -z "$USRNAME" ] ; do
    echo "-Welcome to UCC"
    read -p "Username: " -r USRNAME JUNK
done
echo "! $USRNAME !"
echo "ssh -e none -l \"$USRNAME\"  ssh.ucc.asn.au" | hd
ssh -e none -l "$USRNAME"  ssh.ucc.asn.au

...as invoked from: /etc/systemd/system/serial-getty at ttyS3.service
including:
# Default template: /lib/systemd/system/serial-getty at .service
# http://0pointer.de/blog/projects/serial-console.html
[...]
ExecStart=-/sbin/getty -n -p -R -l "/usr/local/bin/serial-connect" -L %I 9600 vt510

One bug is that there is a limit to how often systemd will let it
respawn and it got stuck in "start-limit-hit" for a bit:

root at merlo:/etc/systemd/system# systemctl status serial-getty at ttyS3.service
* serial-getty at ttyS3.service - Serial Getty on ttyS3
   Loaded: loaded (/etc/systemd/system/serial-getty at ttyS3.service; enabled; vendor preset: enabled)
   Active: failed (Result: start-limit-hit) since Thu 2018-03-08 17:34:06 AWST; 4 days ago
 Main PID: 14571 (code=killed, signal=INT)
Mar 08 17:34:06 merlo systemd[1]: serial-getty at ttyS3.service: Service hold-off time over, scheduling restart.
Mar 08 17:34:06 merlo systemd[1]: Stopped Serial Getty on ttyS3.
Mar 08 17:34:06 merlo systemd[1]: serial-getty at ttyS3.service: Start request repeated too quickly.
Mar 08 17:34:06 merlo systemd[1]: Failed to start Serial Getty on ttyS3.
Mar 08 17:34:06 merlo systemd[1]: serial-getty at ttyS3.service: Unit entered failed state.
Mar 08 17:34:06 merlo systemd[1]: serial-getty at ttyS3.service: Failed with result 'start-limit-hit'.
root at merlo:/etc/systemd/system# systemctl stop
serial-getty at ttyS3.service
root at merlo:/etc/systemd/system# systemctl start
serial-getty at ttyS3.service
root at merlo:/etc/systemd/system# systemctl status
serial-getty at ttyS3.service
* serial-getty at ttyS3.service - Serial Getty on ttyS3
   Loaded: loaded (/etc/systemd/system/serial-getty at ttyS3.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2018-03-12 21:30:03 AWST; 2s ago
 Main PID: 18881 (serial-connect)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/system-serial\x2dgetty.slice/serial-getty at ttyS3.service
           └─18881 /bin/sh /usr/local/bin/serial-connect
Mar 12 21:30:03 merlo systemd[1]: Started Serial Getty on ttyS3.

It is indeed a:
https://terminals-wiki.org/wiki/index.php/DEC_VT510
Software flow control, so 9600bps it is for now.

There's also a HP small-form-factor PC, it's not booting (or netbooting)
anything interesting right now.

They could use a shelf/workstation of some kind, under 78cm to fit the
gap between the snack machine and UniSFA's new compactus-style mobile
shelving. Perhaps:
http://www.ikea.com/au/en/catalog/productAlternative/?partNumber=S99246437

Nick.

-- 
   Nick Bannon   | "I made this letter longer than usual because
nick-sig at rcpt.to | I lack the time to make it shorter." - Pascal


More information about the tech mailing list