Skip to main content

Users & security settings

Mo OS is a standard Debian system: accounts, passwords, sudo and SSH use Debian tools. Kernel-dependent features such as firewall front ends still need board-specific verification. This page covers the settings that matter for a board that is reachable over the network, starting with the account created at first boot.

Tested software

This page was tested on Mo62A image V1.1.0 (built 2026-08-19), with Debian 13 (Trixie) and Linux 6.12.35. Commands and defaults can differ in later releases.

Accounts created at first boot​

The first boot reads sysconfig.txt from the BOOT partition and creates the account named there (see Pre-configure the board). On the tested image this account:

  • is a member of the sudo group;
  • can run sudo without entering a password, through the file /etc/sudoers.d/010-USERNAME-nopasswd;
  • receives the SSH public key from user_ssh_key, if one was set.

The root account stays locked unless root_password is set, and even then it cannot log in over SSH with a password. root_ssh_key installs a key for root instead. Replace the default username and password in sysconfig.txt before the first boot; if the board already booted with them, change the password now.

Change your password​

Run passwd as the user whose password you want to change. Enter the current password once and the new password twice. Nothing is displayed while you type.

passwd

passwd -S shows the account status: P means the password is set and usable, L means password authentication is locked; this does not disable every login method.

Mo62A terminal changing a user password with passwd and showing the account status with passwd -S

An administrator can set another user's password with sudo passwd USERNAME, or lock its password with sudo passwd -l USERNAME. SSH keys and other authentication methods may still permit access; review those separately when disabling an account.

Add users and grant permissions​

Create a user, set a password and add the groups the user needs. Group membership takes effect at the next login.

sudo adduser --gecos 'Bob Example' --disabled-password bob
sudo passwd bob
sudo usermod -aG sudo,dialout,video,render bob
groups bob
Mo62A terminal creating the user bob, setting a password, adding groups with usermod and listing the result

Groups that control access to Mo62A hardware and services:

GroupGrants access to
sudoAdministrative commands through sudo
dialoutSerial ports, including USB-to-UART adapters
video, renderCameras, the display controller and the GPU
audioSound devices
plugdevRemovable USB devices
netdev, bluetoothChanging network connections and Bluetooth settings from the desktop
i2c, gpioI²C and GPIO character devices on the 40-pin header
dockerThe Docker daemon, which is equivalent to root access

The AI demos and the TI Edge AI runtime use /dev/mem, DMA heaps and the C7x remote processor. On the tested image these need root, so run them with sudo or through the supplied edgeai-demo launcher. Remove a user with sudo deluser --remove-home USERNAME.

Require a password for sudo​

The first-boot account runs sudo without a password. This is convenient on a development bench, but any process running as that user can then become root. To require the user's password again, remove the drop-in file and check the result:

sudo rm /etc/sudoers.d/010-USERNAME-nopasswd
sudo -k
sudo -l

Replace USERNAME with the account name. sudo -k clears cached authentication and sudo -l lists the effective rules. Check for any remaining NOPASSWD entries. Membership in sudo normally requires a password on Debian, but another matching rule can override that policy.

Harden the SSH server​

Set up key login first, as described in Remote access, and confirm that it works for every account that needs remote access. Then put your settings in a drop-in file rather than editing /etc/ssh/sshd_config:

sudo tee /etc/ssh/sshd_config.d/50-local.conf <<'EOF'
PasswordAuthentication no
PermitRootLogin no
MaxAuthTries 3
EOF
sudo sshd -t && sudo systemctl reload ssh
sudo sshd -T | grep -E '^(passwordauthentication|permitrootlogin|maxauthtries) '

sshd -t checks the syntax before anything changes, reload applies the new settings without closing existing sessions, and sshd -T prints the values the server now uses.

warning

Keep your current SSH session open and log in from a second terminal to confirm that key login still works. If it fails, remove the drop-in file from the first session and reload again. Without a working key, a local desktop or the serial console is the only way back in.

Mo62A terminal writing an SSH drop-in file that disables password login, testing the configuration, reloading the service and showing the active values

To restore the previous settings, delete /etc/ssh/sshd_config.d/50-local.conf, then run sudo sshd -t && sudo systemctl reload ssh. Confirm the effective settings and a new login.

Enable a firewall​

On the inspected board, the system nftables service is inactive, while Docker maintains its own tables. Use the dedicated inet mo_host_filter table below to filter traffic addressed to the host. It leaves other tables intact and does not control forwarded container ports. Review Docker's published ports separately.

Keep a recovery path

Keep a serial console or local desktop available, leave the current SSH session open and test a second SSH connection after applying changes. Do not combine this example with an existing firewall manager without reviewing the combined policy. An accept here cannot override a drop in another base chain.

Mo62A kernel and service behavior

The V1.1.0 kernel lacks match modules needed by the installed ufw front end; ufw enable can leave the board unreachable. Also, Debian's stock nftables.service uses nft flush ruleset when stopped, which removes Docker rules too. Do not start, reload or stop that service to manage this example, and do not use a global flush ruleset.

1. Review the rules and service. Download mo-host-filter.nft and mo-host-filter.service into a working directory on the board. Their contents are shown here:

mo-host-filter.nft
#!/usr/sbin/nft -f
# Replace only this table in one transaction; preserve Docker and other tables.
add table inet mo_host_filter
delete table inet mo_host_filter
table inet mo_host_filter {
chain input {
type filter hook input priority 0; policy drop;
ct state established,related accept
iifname "lo" accept
ct state invalid drop
ip protocol icmp accept
meta l4proto ipv6-icmp accept
udp sport 67 udp dport 68 accept
udp sport 547 udp dport 546 accept
tcp dport 22 accept
udp dport 5353 accept
}
}

The file replaces only its own table in one atomic transaction. It accepts established traffic, loopback, ICMP/ICMPv6, DHCP client replies, SSH and mDNS. Add a tcp dport or udp dport rule for every additional host service you expose. VNC through an SSH tunnel needs no extra port.

mo-host-filter.service
[Unit]
Description=Mo host input firewall (dedicated nftables table)
Documentation=https://developer.inhand.com/docs/mo-62a/mo-os/users-and-security/
Wants=network-pre.target
Before=network-pre.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/usr/sbin/nft -c -f /etc/mo-host-filter.nft
ExecStart=/usr/sbin/nft -f /etc/mo-host-filter.nft
ExecReload=/usr/sbin/nft -c -f /etc/mo-host-filter.nft
ExecReload=/usr/sbin/nft -f /etc/mo-host-filter.nft
ExecStop=/usr/sbin/nft delete table inet mo_host_filter

[Install]
WantedBy=multi-user.target

2. Install and check the files. Run from the download directory:

sudo install -m 0644 mo-host-filter.nft /etc/mo-host-filter.nft
sudo install -m 0644 mo-host-filter.service /etc/systemd/system/mo-host-filter.service
sudo systemctl daemon-reload
sudo nft -c -f /etc/mo-host-filter.nft && sudo systemctl enable --now mo-host-filter
sudo nft list chain inet mo_host_filter input

nft -c checks without applying changes; the service also checks before each start or reload. Confirm a fresh SSH login and any required network services. After editing /etc/mo-host-filter.nft, use sudo systemctl reload mo-host-filter. To remove only this firewall, use sudo systemctl disable --now mo-host-filter; its stop command deletes only inet mo_host_filter.

Validation boundary

On 2026-10-23, the example passed systemd-analyze verify and nftables syntax, apply, repeated-load and table-removal checks in an isolated network namespace on the Mo62A development board (Linux 6.12.35, nftables 1.1.3). An unrelated table survived each operation, and the host ruleset fingerprint was unchanged. This did not enable a persistent firewall on the board or test a reboot, DHCP renewal or forwarded container connectivity. Validate those paths for your deployment.

Keep the system updated​

Security fixes for Debian packages arrive through APT. Check for and install updates regularly as described in Install Debian packages, and follow the release notes for Mo OS image updates that replace the kernel, firmware and AI runtime.

Troubleshooting​

SymptomWhat to check
sudo says the user is not in sudoersAdd the user to the sudo group with sudo usermod -aG sudo USERNAME from an administrator account, then log in again.
A new group does not take effectGroup changes apply at the next login. Log out and back in, or start a new SSH session.
Password rejected after SSH hardeningPasswordAuthentication no is active. Log in with your key, or remove /etc/ssh/sshd_config.d/50-local.conf from a local or serial console and reload the service.
Unreachable after ufw enableufw is not supported on this kernel. From the local desktop or serial console, disable ufw with sudo ufw disable, inspect sudo nft list ruleset and restore the known-good host policy if necessary. Do not globally flush tables belonging to Docker or another manager.
sshd -t reports an errorFix the drop-in file before reloading; the running server keeps the previous configuration until the reload succeeds.
The .local name stops answeringThe firewall blocks mDNS. Keep udp dport 5353 accept in the input chain and reload mo-host-filter.
A service is blocked by the firewallRun sudo nft list chain inet mo_host_filter input and add an accept rule for the port; compare with ss -ltnu to see which ports are listening.

Source: inhandnet/mo-docs · 7ba0dc46