How to disable the password complexity on Red Hat Linux?

How to disable the password complexity on Red Hat Linux?

This post describes the procedure of how to disable the password complexity on Red Hat Linux after security hardening is performed for passwords. Please have a look below for details.

INITIAL NOTICE

Exercise caution when disabling password complexity, as complexity of new passwords may become lower, which brings risks to systems.

PROCEDURE

1. Log in to the operating system as a common user and switch to the root user.

2. Modify the configuration file for setting the password complexity:

# vi /etc/pam.d/password-auth

The following information is displayed:

auth       required     pam_env.so

auth       sufficient   pam_unix.so try_first_pass nullok

auth       required     pam_deny.so

account    required     pam_unix.so

password   requisite    pam_cracklib.so try_first_pass retry=3 minlen=8 lcredit=-1 ucredit=-1 dcredit=-1 ocredit=0 enforce_for_root

password   sufficient   pam_unix.so try_first_pass use_authtok nullok sha512 shadow

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

# vi /etc/pam.d/system-auth

The following information is displayed:

#%PAM-1.0

# This file is auto-generated.

# User changes will be destroyed the next time authconfig is run.

auth       required     pam_env.so

auth       sufficient   pam_unix.so try_first_pass nullok

auth       required     pam_deny.so 

account    required     pam_unix.so

password   requisite    pam_cracklib.so try_first_pass retry=3 minlen=8 lcredit=-1 ucredit=-1 dcredit=-1 ocredit=0 enforce_for_root

password   sufficient   pam_unix.so try_first_pass use_authtok nullok sha512 shadow

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

Parameter settings in the pam_cracklib.so line control user password complexity and enforce_for_root indicates that the password of the root user also needs to meet the password complexity requirements.

3. Add a comment tag (#) before the pam_cracklib.so line in the password-auth and system-auth configuration files to comment out the line. 

NOTICE

After the password complexity has been disabled, the complexity of the new passwords may become lower, which brings risks tosystems.

Therefore, you must enable the password complexity again. To enable the password complexity again, delete the added comment tag (#), save the modification and exit.

4. Press Esc.

5. Run the :wq command and press Enter.

This is thus how to disable the password complexity on Red Hat Linux.

要查看或添加评论,请登录

Caiting Ye的更多文章

  • IdeaHub - Obtaining the Activation Code

    IdeaHub - Obtaining the Activation Code

    First, what is the function of the activation code? To access the HUAWEI CLOUD Meeting service and SMC network, you…

    2 条评论
  • Difference between 1080p, 4K, and 8K

    Difference between 1080p, 4K, and 8K

    1080p, 4k, 8k, these words, either with the letter K or with the letter P, so what is K? What's P? In a broad sense, K…

  • Huawei Global Intelligent Education Summit 2021(July 7–8, 2021, Online)

    Huawei Global Intelligent Education Summit 2021(July 7–8, 2021, Online)

    oday, education is ever-more personalized, ever-more hybrid. With new digital models emerging across the board — in…

  • The video format introduction- AVI/MOV/ASF/WMV

    The video format introduction- AVI/MOV/ASF/WMV

    AVI AVI, the abbreviation of Audio Video Interleaved. AVI, a video format released by Microsoft, is one of the oldest…

  • Camera lens focal length

    Camera lens focal length

    Facal length If you read "f =" on the camera's English specification, then the number that follows is usually its focal…

  • Picture format introduction - JPEG

    Picture format introduction - JPEG

    What is JPEG The JPEG, full name Joint Photographic Expert Group, is also one of the most common image formats. It is…

  • What is 4G Category.X

    What is 4G Category.X

    Currently, existing 2G and 3G IoT services are migrating to NB-IoT, 4G, and 5G networks. 4G Cat.

  • Smart projection of IdeaHub

    Smart projection of IdeaHub

    What is smart projection? The IdeaHub supports wired and wireless projection, allowing you to easily share audios…

  • Huawei IdeaHub

    Huawei IdeaHub

    Today I’ll be introducing Huawei new interactive smart board solution for the video conferences, smart classrooms…

    1 条评论
  • Camera Upgrade Guide for Huawei

    Camera Upgrade Guide for Huawei

    During the use of a camera, the camera may need to be upgraded due to new functions and optimization problems. How to…

    2 条评论

社区洞察

其他会员也浏览了