当前位置:网站首页>2022.07.02
2022.07.02
2022-07-07 17:01:00 【ifuudoudou】
课时10 回顾和学习目标
课时11用户,用户组和权限管理
在使用su root的时候一开始我失败了,因为没有初始化root。
所以需要输入sudo passwd root,来初始化,才能成功。
进入根目录后,可以用whoami这个命令查看当前登陆的账号。
创建新用户时,一开始我是用的“add user”结果报错说没有这个命令。
后来看了这个文档Linux下如何手动创建新的用户(How to create new users manually under Linux) - 豆丁网,才发现中间没有空格,是“adduser”。
查看新创建用户信息时也要注意,cat /etc/passwd这个目录里棉,cat后面必须有空格。
刚刚创建好的用户的信息就在最下面。
课时12
切换回home,再用ll查看文件里面的信息,可以发现没有刚才创建的用户目录。
也就是说,用户并没有创建成功。
因为刚才我们并没有添加详细信息。
现在我们使用了-m来创建,然后再利用cat /etc/passwd来查看,可以看见已经有了。
接着我们利用password 来设定新用户的密码。
设定之后利用su test02来切换。
用whoami来查看,发现现在确实切换到了test02.
想要回去原来的目录的话,利用crtl+d就可以退出了。
如果想要在切换用户的同时,切换到加的目录下面的话。
在su 前面加一个横线就可以。
删除时利用userdel test02.
但是增加的目录是不会删除的。
删除增加的目录要用递归删除。
接着重新按照上面的方法建立了一个test03,再用userdel -r test03的方法来删除。
这样的话连添加的目录也可以删除。
虽然报错了,但是不影响。
边栏推荐
- 持续测试(CT)实战经验分享
- Continuous test (CT) practical experience sharing
- A hodgepodge of ICER knowledge points (attached with a large number of topics, which are constantly being updated)
- 二叉树的基本概念和性质
- App capture of charles+postern
- Redis
- Flipping Game(枚举)
- 线程池的拒绝策略
- 国内首次!这家中国企业的语言AI实力被公认全球No.2!仅次于谷歌
- DataSimba推出微信小程序,DataNuza接受全场景考验? | StartDT Hackathon
猜你喜欢
我感觉被骗了,微信内测 “大小号” 功能,同一手机号可注册两个微信
博睿数据入选《2022爱分析 · IT运维厂商全景报告》
Learn open62541 -- [67] add custom enum and display name
Datasimba launched wechat applet, and datanuza accepted the test of the whole scene| StartDT Hackathon
Reuse of data validation framework Apache bval
6. About JWT
Charles+drony的APP抓包
Industry case | digital operation base helps the transformation of life insurance industry
[unity shader] insert pass to realize the X-ray perspective effect of model occlusion
Short selling, overprinting and stock keeping, Oriental selection actually sold 2.66 million books in Tiktok in one month
随机推荐
AI来搞财富分配比人更公平?来自DeepMind的多人博弈游戏研究
微信网页调试8.0.19换掉X5内核,改用xweb,所以x5调试方式已经不能用了,现在有了解决方案
Redis集群与扩展
App capture of charles+drony
2022-07-04 matlab reads video frames and saves them
Tsinghua, Cambridge and UIC jointly launched the first Chinese fact verification data set: evidence-based, covering many fields such as medical society
线程池的拒绝策略
Continuous test (CT) practical experience sharing
国内首次!这家中国企业的语言AI实力被公认全球No.2!仅次于谷歌
I feel cheated. Wechat tests the function of "size number" internally, and two wechat can be registered with the same mobile number
手把手教姐姐写消息队列
将模型的记忆保存下来!Meta&UC Berkeley提出MeMViT,建模时间支持比现有模型长30倍,计算量仅增加4.5%...
Mathematical analysis_ Notes_ Chapter 11: Fourier series
CVPR 2022丨学习用于小样本语义分割的非目标知识
Five network IO models
RISCV64
POJ 1182 :食物链(并查集)[通俗易懂]
DataSimba推出微信小程序,DataNuza接受全场景考验? | StartDT Hackathon
CVPR 2022 - learning non target knowledge for semantic segmentation of small samples
[information security laws and regulations] review