Add normal new users to Linux

Source: Internet
Author: User

Add a normal new user to Linux, and a superuser (also known as "root") is a special account that has the power to modify any file in the system. In daily work, it is best not to use the Super user account to enter the system, because any error operation can cause huge losses. Since the Superuser account is the only account that is available after the system is established, you need to establish and use a general user account for daily work.

A superuser can create a new user account, and the following command creates a new user named Joe:

# AddUser Joe

# passwd Joe (type Joe's password)

Linux uses a strategy that separates the system administrator from the general user, which guarantees the robustness of the system while also making it difficult to write a virus under Linux (the user writes a program that only has write access to its own directory and is separated from other parts of the operating system).

In general, users need to modify their passwords immediately when they first register. The order is as follows:

(current) Unix Password [type old password]

New Unix Password [type password]

Retype New Unix Password

[Type a new password again]

For security reasons, the password you type is not displayed on the screen.

Weak passwords are the main cause of system insecurity. For example, use the word "password" as the password, the name of yourself or others as the password, the company name, department name or group name as the password, the birthday as a password, write the password on the calendar or the computer, use a dictionary of words or commonly used words. A good password should be at least 6 letters long, containing letters and numbers, and should be modified frequently.

The system administrator can configure a program to set the security policy for the password. For example, you can start the Linuxconf utility as root to make account configuration and change. If you forget the superuser password, you can only start the system with the Linux boot disk, then locate the Linux partition on your hard disk, edit the/etc/passwd file, and in this file, delete the password that the root user is encrypted.

Suppose the registration entry for root in/etc/passwd is as follows:

Root:x:0:0:root:/root:/bin/bash

where "X" is the result of password encryption, you should change it to the following form:

Root::0:0:root:/root:/bin/bash

Now, Root does not have a password, so you can restart the machine, register with root at the registration prompt, and press the key when prompted to enter the password.

Another workaround is to reinstall the system.

If the average user (not root) forgets his or her password, it is easy to fix, and root can modify any user's password.

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.