In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article focuses on "how to force Linux users to change their initial password when they log in for the first time". Friends who are interested may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor learn how to force Linux users to change their initial password when they log in for the first time.
Each user account under Linux is associated with each configuration and information related to the password. For example, it remembers the date of the last password change, the minimum / maximum number of days between password changes, and when the current password expires, and so on.
A command-line tool called chage can access and adjust configurations related to password expiration. You can use this tool to force any user to change their password the next time they log in.
To see the password expiration information for a particular user, such as alice, run the following command. Please note that root permissions are required only if you check the password validity information of any user other than yourself.
$sudo chage-l alice
Force the user to change the password
If you want to force users to change their passwords, use the following command.
$sudo chage-d0
Initially, the "- d" option should be set to the "validity period" of the password (the number of days since the password was last changed on January 1, 1970). So, "- d0" indicates that the password was changed on January 1, 1970, which effectively expires the current password, allowing the password to be changed the next time you log in.
Another way to expire the current password is through the passwd command.
$sudo passwd-e
The above command has the same effect as "chage-d0", making the user's current password expire immediately.
Now, check the user's password information again, and you will see:
When you log in again, you will be asked to change your password. You need to confirm your current password several times before you change your password.
At this point, I believe you have a deeper understanding of "how to force Linux users to change their initial password when logging in for the first time". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.