Got it

The way to Change Password Complexity Settings for SUSE

Latest reply: Jan 1, 2022 06:53:55 6873 6 9 0 0

Hello, guys!

Good day to you!

This topic describes how to change the complexity of a user password after security hardening is performed for the password.

 

Change the password complexity settings for SUSE

1. Log in to a server as the root user.

2. Run the following command to view the configuration file for configuring password complexity: 

# cat /etc/pam.d/common-password

 

The following information is displayed:

password        requisite       pam_pwcheck.so  nullok cracklib remember=3
password        requisite       pam_cracklib.so minlen=8 lcredit=-1 ucredit=-1 dcredit=-1 ocredit=0 use_authtok
password        required        pam_unix2.so    use_authtok nullok

 

Table 1 describes parameters for configuring password complexity.

Parameter Setting Example

Description

Minlen=8

This example indicates that a password must contain a minimum of eight characters. If you do not want to limit the length of a password, delete this parameter.

Icredit=-1

This example indicates that a password must contain a minimum of one lowercase letter.

  • The value -2 indicates that a password must contain a minimum of two lowercase letters.

  • The value 0 indicates that a password can contain no lowercase letter.

  • The value 3 indicates that a password can contain a maximum of three lowercase letters.

ucredit=-1

This example indicates that a password must contain a minimum of one uppercase letter.

  • The value -2 indicates that a password must contain a minimum of two uppercase letters.

  • The value 0 indicates that a password can contain no uppercase letter.

  • The value 3 indicates that a password can contain a maximum of three uppercase letters.

dcredit=-1

This example indicates that a password must contain a minimum of one digit.

  • The value -2 indicates that a password must contain a minimum of two digits.

  • The value 0 indicates that a password can contain no digit.

  • The value 3 indicates that a password can contain a maximum of three digits.

ocredit=0

This example indicates that a password can contain no special character, such as *#@.

  • The value -2 indicates that a password must contain a minimum of two special characters.

  • The value 0 indicates that a password can contain no special character.

  • The value 3 indicates that a password can contain a maximum of three special characters.



PS:

  • The complexity rules are not applicable to the password of the root user.

  • The complexity rules are not applicable to the passwords configured by the root user for other users.


Thanks for reading!

  • x
  • convention:

yWX511501
Created Dec 29, 2018 10:04:57

The following information is displayed:password requisite pam_pwcheck.so nullok cracklib remember=3

password requisite pam_cracklib.so minlen=8 lcredit=-1 ucredit=-1 dcredit=-1 ocredit=0 use_authtok

password required pam_unix2.so use_authtok nullok
View more
  • x
  • convention:

johnfish
Created Feb 10, 2019 08:02:07

excellent share knowledge
View more
  • x
  • convention:

little_fish
Admin Created Sep 30, 2020 11:27:02

Thank you for this excellent sharing!
View more
  • x
  • convention:

alejandrolla
Created Oct 15, 2020 13:01:55

excellent sharing!
View more
  • x
  • convention:

Y_T_Z
Admin Created Mar 29, 2021 06:43:24

Thank!
View more
  • x
  • convention:

Yencao
Created Jan 1, 2022 06:53:55

Thanks for sharing
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.
Information Protection Guide
Thanks for using Huawei Enterprise Support Community! We will help you learn how we collect, use, store and share your personal information and the rights you have in accordance with Privacy Policy and User Agreement.