Linux get started common command password-modify password, change user _unix Linux
Source: Internet
Author: User
passwd Command
For system security reasons, each user in a Linux system has a user password in addition to its user name. Therefore, when using the Useradd command, you also need to use the passwd command to set the password for each newly added user, and users can change their passwords at any time with the passwd command.
The general format for this command is: passwd [username] where the user name is the user who needs to modify the password. Only Superuser can use the "passwd username" to modify other user's password, ordinary users can only use passwd command without parameters to modify their password.
The command uses the following methods:
Input
passwd< enter>;
Under (current) UNIX passwd: Enter the password below
At the new password: Prompt to enter the password (not visible on the screen):
The system prompts you to enter this new password again.
After the input is correct, the new password is encrypted and placed in the/etc/shdow file. It is important to choose a password that is not easily deciphered.
Selecting a password should follow the following rules:
The password should have at least six digits (preferably eight-bit) characters;
The password should be a mixture of uppercase and lowercase letters, punctuation marks, and numbers.
The process by which a superuser modifies the password of another user (XXQ) is as follows,
This command is very important. It makes it possible for an average user to have Superuser or other user privileges, or to have a superuser do something as a regular user. A normal user must have the password of a superuser or another user when using this command. If you want to leave the current user's identity, you can play exit.
The general form of the command is: su [options] [?] [User Account]
Note: If you do not specify a user account, the system defaults to Superuser root. The meanings of the options in this command are:
C executes a command and ends.
The purpose of adding this minus sign is to make the environment variable the same as the user you want to convert.
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.