An important part of linux user password management is user password management. A user account has no password when it was created, but is locked by the system and cannot be used. it can only be used after a password is specified, even if it is null. The Shell command for specifying and modifying user passwords is an important part of user management for passwd... linux user password management. A user account has no password when it was created, but is locked by the system and cannot be used. it can only be used after a password is specified, even if it is null. The Shell command used to specify and modify the user password is passwd. Super users can specify passwords for themselves and other users. common users can only use them to modify their own passwords. The command format is: Code: www.2cto.com passwd option options available for the user name: Code:-l lock password, that is, disable the account. -U password unlock. -D indicates that the account has no password. -F forces the user to change the password upon next login. If the default user name is used, modify the password of the current user. For example, if the current user is sam, the following command modifies the user's password: www.2cto.com code: $ passwd Old password: ****** New password: * ****** Re-enter new password: ******* if you are a super user, you can specify the password of any user in the following form: Code: # passwd sam New password: ******* Re-enter new password: ******** www.2cto.com, the passwd command will first ask for the original password, and then ask the user to enter the new password twice after verification. if the two passwords are the same, specify the password to the user; when a super user specifies a password for the user, the original password is not required. For the sake of system security, you should select a complicated password. for example, you 'd better use an 8-bit long password, which contains uppercase letters, lowercase letters, and numbers, it should be different from the name and birthday. When you specify a blank password for a user, execute the following command: Code: # passwd-d sam www.2cto.com this command deletes the password of the user sam, so that the user sam will log on to the next time, the system no longer asks for the password. The passwd command can also use the-l (lock) option to lock a user so that the user cannot log on. for example, code: # passwd-l sam
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.