SSH allows root login with a password, and there is no non-root account #2
Labels
No labels
blocked-physical
cleanup
hardware
infra
kernel
P1-critical
P2-high
P3-normal
P4-later
reliability
security
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
tiagoagueda/a80#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Effective
sshd -Ton the board:roothas a password set, and there are no non-root users at all. Only port 22 is listening,which is the one good thing here.
Done when
PermitRootLogin prohibit-passwordPasswordAuthentication no⚠️ Do this with WiFi (
192.168.27.45) or the serial console open as a fallback. Lockingyourself out of a headless board with no remote power control means a physical trip.
Most of the checklist done 2026-08-29, verified from fresh sessions on both network paths.
Not closed - the passwords are the owner's to set, and that is the last step.
draco, uid 1000, insudo, carrying the key root already trustedPermitRootLogin prohibit-passwordPasswordAuthentication no(plusKbdInteractiveAuthentication no, or PAM'skeyboard-interactive route stays open)
draconeeds a password - forsudoand for the serial consoleApplied as a drop-in.
sshd_confighas itsIncludeat line 12, above its ownPermitRootLogin yes, and sshd keeps the first value it obtains for a keyword - so thedrop-in wins rather than being overridden by the line below. Validated with
sshd -tbeforereloading, and reloaded rather than restarted.
prohibit-passwordrather thannodeliberately: root key login is how the deploy and probetooling reaches this board, and removing it would mean rebuilding all of that for no security
gain, since the key is the only credential either way.
⚠️ The serial console is not covered.
serial-getty@ttyS0authenticates through PAMagainst
/etc/shadow, so accounts still need real passwords for physical recovery - which isexactly why this cannot be finished without you.
⚠️ The rescue SD card is a clone made before all of this and still accepts root with a
password.
tools/sync-rescue-sd.shnow carries the hardening drop-in and the admin key, butthe card is not safe until it is re-synced.
And something worse turned up on the way
/was owned by uid 1000 and group-writable, as were/usr/lib/modulesand six filesunder it - an orphaned uid from however this rootfs was built, harmless only because no
account had that uid.
Creating the admin account as uid 1000 would have handed it write access to
/and to akernel modules directory - a privilege-escalation path introduced by the act of fixing a
password problem. Caught because
aptwarned about an unsafe path transition while installingsudo.
Fixed:
root:root 755,dracoverified refused write access to/, and nothing outside/homeis uid or gid 1000. Worth re-checking after any rootfs restore:Done 2026-08-29. Every box ticked and each one verified from a fresh session.
draco, uid 1000PermitRootLogin prohibit-passwordPasswordAuthentication no(andKbdInteractiveAuthentication no, or PAM'skeyboard-interactive route would stay open)
The serial console test matters because
serial-getty@ttyS0authenticates through PAM and isnot covered by any sshd setting - it is the physical recovery path, and it now works with the
new credential rather than the published one.
prohibit-passwordrather thannodeliberately: root key login is how the deploy and probetooling reaches this board. The key is the only credential either way, so refusing it would
have cost a lot and bought nothing.
The part that was not in the plan
Installing
sudoproduced an odd apt warning about an unsafe path transition. Following itup:
/was owned by uid 1000 and group-writable, as were/usr/lib/modulesand six filesunder it - an orphaned uid from however this rootfs was built, harmless only because no
account had that uid.
Creating this admin account as uid 1000 would have handed it write access to
/and to akernel modules directory. A privilege-escalation path introduced by the act of closing a
password issue, and it would have been easy to close this ticket without noticing.
Fixed to
root:root 755,dracoverified refused write access to/, and nothing outside/homeis uid or gid 1000. Worth re-running after any rootfs restore: