Restrict Serial Port Root Logins

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