Restrict Serial Port Root Logins

This page is not yet available in Spanish. We are working on its translation.
If you have any questions or feedback about our current translation project, feel free to reach out to us!

Description

To restrict root logins on serial ports, ensure lines of this form do not appear in /etc/securetty:

ttyS0
ttyS1

Rationale

Preventing direct root login to serial port interfaces helps ensure accountability for actions taken on the systems using the root account.

Remediation

Shell script

The following script can be run on the host to remediate the issue.

#!/bin/bash

sed -i '/ttyS/d' /etc/securetty
PREVIEWING: mervebolat/span-id-preprocessing