Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to add ordinary new users in Linux

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the knowledge of "how to add ordinary new users in Linux". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Add an ordinary new user to Linux, and a superuser (also known as "root") is a special account with the authority 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 misoperation may cause huge losses. Since the super user account is the only account provided after the system is established, you need to establish and use a general user account for daily work.

The superuser can create a new user account. The following command will create a new user named joe:

# adduser joe

# passwd joe (type the password of joe)

Linux adopts a strategy that separates system administrators from ordinary users, which ensures the robustness of the system and makes it difficult to write viruses under Linux (the programs written by users only have write access to their own directories, but are separated from the rest of the operating system).

In general, users need to change their password immediately when they register for the first time. The command is as follows:

(current) Unix Password [type the old password]

New Unix Password [type a new password]

Retype New Unix Password

[type the new password again]

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

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

The system administrator can set the security policy of the password through the configuration program. For example, you can launch the linuxconf utility as root to configure and change your account. If you forget the super user's password, you can only boot the system with Linux's boot disk, then find the Linux partition on the hard drive, and then edit the / etc/passwd file, where the encrypted password of the root user is deleted.

Assume that the 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 for the password.

Another solution is to reinstall the system.

If the average user (non-root) forgets his password, it's easy to solve, and root can change any user's password.

This is the end of the content of "how to add ordinary new users in Linux". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report