What is the difference between usermod account locking and passwd account locking? usermodpasswd

Source: Internet
Author: User

What is the difference between usermod account locking and passwd account locking? usermodpasswd

From: http://www.apelearn.com/bbs/thread-6658-1-1.html

 

Passwd-l: Lock the account and add it to the front of the password string !.

Passwd-u removes the password string !.

By default, usermod-L only locks the password and adds it before the password string !.

By default, usermod-U only unlocks the password and removes the password before the string !.

First, lock user1 with passwd, test with usermod, and 1.

Figure 1:

We can see that user1 is added in front of the password !!, The password for test is added !.

Then, use usermod-U twice to unlock user1, 2, and 3.

Figure 2:

Figure 3:

User1 can be used for normal login, 8.

Figure 4:

 

I personally understand that, whether it is locking an account or locking a password, it is actually adding it in front of the Account Password !, In either way, the password is removed !.
Usermod cannot unlock the account locked by passwd at a time because two accounts are in front of the account locked by passwd !, Usermod only removes one !, Therefore, the user can be unlocked after two usermod operations.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.