Files
aimee-os/package/aimee-os-utils/root-shell@.service
Dustin C. Hatch 91b584dfd2
Some checks reported errors
Aimee OS/aimee-os/pipeline/head Something is wrong with the build of this commit
utils: Add option to run root shell on console
Until I develop a captive portal-based mechanism for initially
configuring the WiFi on Raspberry Pi machines, the easiest way to do
initial provisioning is using the CLI via the serial console.  Since the
root account has no password, and I don't want to have to specify one in
downstream projects' configurations, I've added a configuration option
to enable automatically launching a root shell connected to the serial
console instead of a login prompt.  The security risks here are pretty
minimal, because someone would need phyiscal access to the device in
order to use this shell, in which case they could use any number of
other methods to get control of the system.
2025-11-15 13:05:37 -06:00

27 lines
657 B
Desktop File

[Unit]
Description=root shell on %I
After=sshd.service
Conflicts=shutdown.target
Conflicts=getty@%i.service serial-getty@%i.service
[Service]
Type=idle
Environment=TERM=linux
ExecStart=/bin/sh
Restart=always
RestartSec=0
StandardInput=tty
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
KillMode=process
IgnoreSIGPIPE=no
KillSignal=SIGHUP
# Unset locale for the console getty since the console has problems
# displaying some internationalized messages.
UnsetEnvironment=LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION
[Install]
WantedBy=multi-user.target