当前位置:网站首页>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 .
边栏推荐
- 多个kubernetes集群如何实现共享同一个存储
- First time in China! The language AI strength of this Chinese enterprise is recognized as No.2 in the world! Second only to Google
- 如何选择合适的自动化测试工具?
- 前首富,沉迷种田
- 网易云信参与中国信通院《实时音视频服务(RTC)基础能力要求及评估方法》标准编制...
- Continuous test (CT) practical experience sharing
- How to implement safety practice in software development stage
- Redis
- Chief technology officer of Pasqual: analog quantum computing takes the lead in bringing quantum advantages to industry
- Comparison and selection of kubernetes Devops CD Tools
猜你喜欢
随机推荐
Pasqal首席技术官:模拟量子计算率先为工业带来量子优势
Do you know all four common cache modes?
POJ 1182 :食物链(并查集)[通俗易懂]
如何给“不卖笔”的晨光估值?
How to implement safety practice in software development stage
炒股如何开户?请问一下手机开户股票开户安全吗?
Borui data was selected in the 2022 love analysis - Panoramic report of it operation and maintenance manufacturers
面试唯品会实习测试岗、抖音实习测试岗【真实投稿】
国内首次!这家中国企业的语言AI实力被公认全球No.2!仅次于谷歌
学习open62541 --- [67] 添加自定义Enum并显示名字
2022上半年朋友圈都在传的10本书,找到了
PTA 1101 B是A的多少倍
Reuse of data validation framework Apache bval
[tpm2.0 principle and Application guide] Chapter 16, 17 and 18
【牛客网刷题系列 之 Verilog进阶挑战】~ 多bit MUX同步器
Command mode - unity
[sword finger offer] 59 - I. maximum value of sliding window
Micro service remote debug, nocalhost + rainbow micro service development second bullet
6.关于jwt
AI来搞财富分配比人更公平?来自DeepMind的多人博弈游戏研究