Test as a getty login manager

This is an opt-in administrator workflow for a disposable test system. The development branch requires real-system validation before a production deployment. Keep your existing tty1 login and another administrator session working throughout the test.

Use a PAM-enabled binary. Confirm the chosen PAM service exists under /etc/pam.d/ and that your distribution’s policy supplies the intended account checks, session, logind/elogind and credentials. GoCDM defaults to service login; use -pam-service to select an administrator-provided alternative. Do not copy a permissive policy or remove an existing authentication requirement to make a test pass.

The login UI follows the configured PAM service’s prompts, including separate verification challenges. Hidden responses are masked in the TUI. Use -tui-login=false for a line-oriented prompt with hidden terminal echo. Escape cancels either adapter. In the line-oriented prompt, Ctrl-C and Ctrl-D also cancel. When PAM requires a password change, the configured password stack provides the prompts and applies its policy. Use the distribution’s supported recovery path if the stack cannot complete the change.

Install the binary with ordinary mode 0755. Start direct login from your getty service with its expected root credentials. Configuration and theme files read before login must live in a root-controlled directory and be regular root-owned files without symlink components or group/other write permissions.

Use a spare systemd VT

Choose an unused VT, such as tty2. Save any existing local override first. From the recovery session, run sudo systemctl edit getty@tty2.service and enter:

[Service]
ExecStart=
ExecStart=-/usr/local/bin/gocdm -mode=login
StandardInput=tty
StandardOutput=tty
StandardError=tty
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes

Then reload and restart only that spare service:

sudo systemctl daemon-reload
sudo systemctl restart getty@tty2.service

Switch to tty2 and authenticate with a test account. First choose a console shell, then test the relevant desktop path. Confirm identity, home, working directory, PAM notices and logout. Repeat login and verify no stale session remains. See manual validation for the checks and evidence to record.

-mode=login/-login requires root and a real interactive terminal for actual launch. It refuses an existing graphical or SSH context. Bare invocation after a normal user login is a selector, so choose direct login mode explicitly in a getty service.

On OpenRC or another init system, preserve a working login service and configure only an unused VT using that distribution’s service mechanism. The systemd unit above is not an OpenRC service definition; this guide does not claim tested OpenRC integration.

Roll back

Restore the saved override, or remove only the override created for this experiment. If there were no other local changes, sudo systemctl revert getty@tty2.service removes the local override. Then run sudo systemctl daemon-reload and sudo systemctl restart getty@tty2.service. Verify the original login prompt works. For recovery from a loop, follow recovery.