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

What is the simple way to create users in Linux system

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article will explain in detail what is the simple way to create users in the Linux system. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

Create user, set password, modify user, delete user: useradd testuser create user testuserpasswd testuser set password for created user testuser description: newly created user will create a user directory under / home testuserusermod-help modify the relevant parameters of this command userdel testuser delete user testuserrm-rf testuser delete user testuser directory

The above commands can only be used on your root account. If you don't know where the commands on your system are, you can use the following command to find its path:

Locate useradd

After creating a new user, the relevant information about the new user will be added to the passwd file in the etc directory: in order to take a screenshot, I used the tail-3 passwd command here to display only the last three lines of information in the file (which is also my concern).

User switching under the command line window: su user name description: su is an abbreviation for switch user, indicating that the user can switch from the new user state and enter "exit" to return to the previous user state.

Add and delete user groups: groupadd testgroup groups add groupdel testgroup group deletion instructions: group addition and deletion information will be reflected in the group file of the etc directory.

Attachment: if you forget your root password, change your root password:

$sudo passwd root

[sudo] password for user1: user1password

Enter the new UNIX password:

Re-enter the new UNIX password:

In this way, the root password has been modified successfully.

What is the simple way to create users in the Linux system is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

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

Development

Wechat

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

12
Report