当前位置:网站首页>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 .
边栏推荐
- Hutool - lightweight DB operation solution
- PTA 1101 B是A的多少倍
- Will low code help enterprises' digital transformation make programmers unemployed?
- PV static creation and dynamic creation
- Reject policy of thread pool
- Charles+Postern的APP抓包
- 从39个kaggle竞赛中总结出来的图像分割的Tips和Tricks
- RISCV64
- Pasqal首席技术官:模拟量子计算率先为工业带来量子优势
- Numpy——axis
猜你喜欢

Mathematical analysis_ Notes_ Chapter 11: Fourier series

Redis集群与扩展

In the first half of 2022, I found 10 books that have been passed around by my circle of friends

Micro service remote debug, nocalhost + rainbow micro service development second bullet
![[information security laws and regulations] review](/img/da/c9318ea8999c3ee629b0e48ab78581.png)
[information security laws and regulations] review
![学习open62541 --- [67] 添加自定义Enum并显示名字](/img/98/e5e25af90b3f98c2be11d7d21e5ea6.png)
学习open62541 --- [67] 添加自定义Enum并显示名字

Borui data was selected in the 2022 love analysis - Panoramic report of it operation and maintenance manufacturers

Version 2.0 of tapdata, the open source live data platform, has been released

Will low code help enterprises' digital transformation make programmers unemployed?

Charles+drony的APP抓包
随机推荐
POJ 1182: food chain (parallel search) [easy to understand]
前首富,沉迷种田
Reject policy of thread pool
如何选择合适的自动化测试工具?
Initial experience of cache and ehcache "suggestions collection"
Numpy——2. Shape of array
Interview vipshop internship testing post, Tiktok internship testing post [true submission]
Borui data was selected in the 2022 love analysis - Panoramic report of it operation and maintenance manufacturers
5billion, another master fund was born in Fujian
In the first half of 2022, I found 10 books that have been passed around by my circle of friends
微信网页调试8.0.19换掉X5内核,改用xweb,所以x5调试方式已经不能用了,现在有了解决方案
【MIME笔记】
RISCV64
ES6 note 1
Cadre de validation des données Apache bval réutilisé
Wechat web debugging 8.0.19 replace the X5 kernel with xweb, so the X5 debugging method can no longer be used. Now there is a solution
Reuse of data validation framework Apache bval
I feel cheated. Wechat tests the function of "size number" internally, and two wechat can be registered with the same mobile number
50亿,福建又诞生一只母基金
Charles+Postern的APP抓包