Linux Disables TTY terminal login

Source: Internet
Author: User

Modify File/etc/pam.d/system-auth

#%pam-1.0
# This file is auto-generated.
# User changes'll be destroyed the next time Authconfig is run.
#auth Required Pam_env.so
#auth sufficient pam_unix.so Nullok Try_first_pass
#auth requisite pam_succeed_if.so uid >= quiet
#auth Required Pam_deny.so
#
Auth Required pam_env.so
Auth Required pam_tally.so onerr=fail per_user deny=3 unlock_time=60
Auth sufficient pam_unix.so Try_first_pass
Auth Required pam_deny.so
#
#account Required Pam_unix.so
#account sufficient pam_succeed_if.so UID < quiet
#account Required Pam_permit.so
Account Required Pam_tally.so
Account Required Pam_unix.so
Account sufficient pam_succeed_if.so UID < quiet
Account Required Pam_permit.so
#
#password requisite pam_cracklib.so try_first_pass retry=3 lcredit=-2 ucredit=-2 dcredit=-2 ocredit=-2
#password sufficient pam_unix.so MD5 shadow Nullok try_first_pass Use_authtok remember=5
#password Required Pam_deny.so
Password requisite pam_cracklib.so minlen=7 ucredit=-2 lcredit=-1 dcredit=-1 ocredit=-2 retry=3
Password sufficient pam_unix.so Use_authtok MD5 shadow remember=5
Password Required pam_deny.so
#
#session Optional pam_keyinit.so Revoke
#session Required Pam_limits.so
#session [Success=1 Default=ignore] pam_succeed_if.so service in Crond quiet Use_uid
#session Required Pam_unix.so
# #Set account retries to three for GEN000460
#account Required pam_tally.so deny=3 no_magic_root Reset
Session optional Pam_keyinit.so Revoke
Session Required Pam_limits.so
session [Success=1 Default=ignore] pam_succeed_if.so service in Crond quiet Use_uid
Session Required Pam_unix.so

Linux Disables TTY terminal login

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.