当前位置:网站首页>2022.07.02
2022.07.02
2022-07-07 19:16:00 【ifuudoudou】
Class hour 10 Review and learning objectives


Class hour 11 user , User groups and rights management


In the use of su root At first, I failed , Because there is no initialization root.
So you need to input sudo passwd root, To initialize the , To succeed .

After entering the root directory , It can be used whoami This command checks the current login account .

When creating a new user , At first I used “add user” The result is an error saying that there is no such order .
Later I read this document Linux How to manually create a new user (How to create new users manually under Linux) - Douding net , Only to find that there is no space in the middle , yes “adduser”.

You should also pay attention to when viewing the newly created user information ,cat /etc/passwd This catalogue contains cotton ,cat There must be a space after .
The information of the newly created user is at the bottom .
Class hour 12
Switch back to the home, Reuse ll Check the information in the file , You can find that there is no user directory just created .
in other words , The user was not created successfully .

Because we didn't add details just now .
![]()
Now we use -m To create , And then reuse it cat /etc/passwd Check it out. , It can be seen that there are already .

Then we use password To set the password of new users .
Use after setting su test02 To switch .
use whoami Check it out. , I found that I did switch to test02.

If you want to go back to the original directory , utilize crtl+d You can quit .

If you want to switch users at the same time , Switch to the added directory .
stay su Add a horizontal line in front of it .
![]()
Use when deleting userdel test02.
But the added directory will not be deleted .
![]()
Delete the added directory by recursion .
Then a new one is established according to the above method test03, Reuse userdel -r test03 To delete .
In this way, even the added directory can be deleted .
Although the report is wrong , But it doesn't affect .
边栏推荐
- Numpy——axis
- Embedded interview questions (algorithm part)
- [information security laws and regulations] review
- UVALive – 4621 Cav 贪心 + 分析「建议收藏」
- Basic operation of chain binary tree (implemented in C language)
- 数据验证框架 Apache BVal 再使用
- Golang client server login
- Hutool - lightweight DB operation solution
- 多个kubernetes集群如何实现共享同一个存储
- SlashData开发者工具榜首等你而定!!!
猜你喜欢

Cadre de validation des données Apache bval réutilisé

虚拟数字人里的生意经

面试唯品会实习测试岗、抖音实习测试岗【真实投稿】

Review of network attack and defense

PV static creation and dynamic creation

Multimodal point cloud fusion and visual location based on image and laser

【软件测试】从企业版BOSS直聘,看求职简历,你没被面上是有原因的

Pasqal首席技术官:模拟量子计算率先为工业带来量子优势

Complete e-commerce system
![[information security laws and regulations] review](/img/da/c9318ea8999c3ee629b0e48ab78581.png)
[information security laws and regulations] review
随机推荐
【Base64笔记】「建议收藏」
2022.07.05
虚拟数字人里的生意经
Nat address translation
L1-023 output gplt (Lua)
2022.07.04
RISCV64
99% of people don't know that privatized deployment is also a permanently free instant messaging software!
Cadre de validation des données Apache bval réutilisé
【牛客网刷题系列 之 Verilog进阶挑战】~ 多bit MUX同步器
Three forms of multimedia technology commonly used in enterprise exhibition hall design
coming! Gaussdb (for Cassandra) new features appear
Reuse of data validation framework Apache bval
Reinforcement learning - learning notes 8 | Q-learning
从39个kaggle竞赛中总结出来的图像分割的Tips和Tricks
基于图像和激光的多模态点云融合与视觉定位
SD_ DATA_ SEND_ SHIFT_ REGISTER
In 2021, the national average salary was released. Have you reached the standard?
IP netns command (memo)
Numpy——2.数组的形状