Red Hat Enterprise Linux 3: System Administration Guide
Prev | Chapter 30. Console Access | Next

# 30.3. Disabling All Console Access

The PAM `pam_console.so` module manages console file permissions and authentication. (Refer to the Red Hat Enterprise Linux Reference Guide for more information on configuring PAM.) To disable all console access, including program and file access, comment out all lines that refer to `pam_console.so` in the `/etc/pam.d/` directory. As root, the following script does the trick:

    cd /etc/pam.d
    for i in * ; do
    sed '/[^#].*pam_console.so/s/^/#/' < $i > foo && mv foo $i
    done

Prev | Home | Next
Disabling Console Program Access | Up | Defining the Console