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
Anaconda Installation Anaconda is a software pack...
Preface I am a PHP programmer who started out as ...
As shown below: XML/HTML CodeCopy content to clip...
The target attribute of a link determines where th...
Table of contents 1. Use help information 2. Crea...
Table of contents Why is IN slow? Which is faster...
WeChat applet trajectory playback mainly uses pol...
Overview of Alibaba Cloud Security Group Sharing ...
How to determine what this points to? ①When calle...
Table of contents 1. Offline installation 2. Onli...
Xhtml has many tags that are not commonly used but...
Table of contents 1. System environment 2. Operat...
Add in the <Head> tag <meta http-equiv=&q...
Table of contents variable Use meaningful and pro...
Copy code The code is as follows: li {width:300px...