1. Change password 1. Modify the password of ordinary users passwd Enter the current password to confirm, then enter the new password to modify 2. Change the root user password sudo passwd root By default, the root user is prohibited from logging in. If you need to remove the restriction, just modify the configuration sudo vim /etc/ssh/sshd_config Comment out the default configuration and add a new line of configuration. The default configuration allows root login, but prohibits root from logging in with a password. PermitRootLogin prohibit-password → PermitRootLogin yes sudo service ssh restart 2. Password complexity strategy Notice! ! ! Before setting the complexity policy, you should first change the password of the current system user to a password that complies with the complexity policy. If it does not comply, the user will be at risk of not being able to log in after setting the complexity policy. Reasonable planning is required in advance. 1. Install the cracklib module Install the cracklib module of PAM, which provides additional password checking capabilities sudo apt-get install libpam-cracklib 2. Related policy settings (1) Prohibit the use of old passwords sudo vim /etc/pam.d/common-password Find the following configuration and add (2) Set the minimum password length sudo vim /etc/pam.d/common-password Find the following configuration and change the default (3) Set password complexity sudo vim /etc/pam.d/common-password Find the following configuration and add (4) Set password expiration date sudo vim /etc/login.defs Find the following configuration. The default is 9999 days, which is equivalent to no limit. The user will be prompted to change the password 7 days before the expiration date. You can modify it according to your needs. PASS_MAX_DAYS 180 PASS_MIN_DAYS 0 PASS_WARN_AGE 14 Summarize This is the end of this article about Ubuntu password modification and password complexity policy settings. For more relevant Ubuntu password modification content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: MySQL GROUP_CONCAT limitation solution
>>: Detailed explanation of how to use the Vue license plate search component
Basic Concepts Current read and snapshot read In ...
To understand load balancing, you must first unde...
1. AIDE AIDE (Advanced Intrusion Detection Enviro...
Table of contents Preface Dynamic SQL 1. Take a l...
Table of contents Basic Edition Step 1: Configure...
In the development environment, the vue project i...
MySQL trigger simple example grammar CREATE TRIGG...
This article introduces the implementation code o...
Step 1: Install Stow In this example, we are usin...
Today I looked at some things related to data bac...
Table of contents About Triggers Use of triggers ...
In fact many people will say “I’ve seen that table...
This article records the detailed process of down...
Preface The following are the ways to implement L...
Use Code Cloud to build a Git code storage wareho...