To create the user account, use fts-adduser
, which is a wrapper script around adduser(8)
:
fts # export NEWUSER=stapelberg fts # fts-adduser ${NEWUSER}
fts-adduser
creates accounts without a password, so you will need to configure an authorized SSH key:
fts # install -d -m 700 -o ${NEWUSER} -g users /home/${NEWUSER}/.ssh fts # install -m 600 -o ${NEWUSER} -g users /dev/stdin /home/${NEWUSER}/.ssh/authorized_keys # copy&paste public key, terminate using Ctrl-D
By default, all serial ports are owned by nobody
with permission 600
(only the owner can read/write).
In order to assign a serial port to a user, use fts-port-owner
, which is a program that modifies the necessary udev rules:
fts # fts-port-owner 1 stapelberg
The port numbers that fts-port-owner
expects range from 1 to 48 and correspond to the labeling on the case.
In case you want to make a port unavailable again, for example after disconnecting the device on that port, just re-assign it to nobody
:
fts # fts-port-owner 1 nobody