当前位置:网站首页>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的方法来删除。
这样的话连添加的目录也可以删除。
虽然报错了,但是不影响。
边栏推荐
- 国内首次!这家中国企业的语言AI实力被公认全球No.2!仅次于谷歌
- Static routing configuration
- Golang client server login
- Idea completely uninstalls installation and configuration notes
- SlashData开发者工具榜首等你而定!!!
- 50亿,福建又诞生一只母基金
- Redis cluster and expansion
- App capture of charles+drony
- The moveposition function of rigidbody2d of unity2d solves the problem of people or screen jitter when moving
- 完整的电商系统
猜你喜欢
![[tpm2.0 principle and Application guide] Chapter 16, 17 and 18](/img/7a/b16549590e6445d9199c8000d47d36.png)
[tpm2.0 principle and Application guide] Chapter 16, 17 and 18

ES6笔记一

Datasimba launched wechat applet, and datanuza accepted the test of the whole scene| StartDT Hackathon

Nunjuks template engine

GSAP animation library

Simple configuration of single arm routing and layer 3 switching

Wireshark analyzes packet capture data * cap

能同时做三个分割任务的模型,性能和效率优于MaskFormer!Meta&UIUC提出通用分割模型,性能优于任务特定模型!开源!...

6.关于jwt

Basic operation of chain binary tree (implemented in C language)
随机推荐
Interview vipshop internship testing post, Tiktok internship testing post [true submission]
Static routing configuration
Flipping Game(枚举)
SlashData开发者工具榜首等你而定!!!
Datasimba launched wechat applet, and datanuza accepted the test of the whole scene| StartDT Hackathon
企业展厅设计中常用的三种多媒体技术形式
unity2d的Rigidbody2D的MovePosition函数移动时人物或屏幕抖动问题解决
能同时做三个分割任务的模型,性能和效率优于MaskFormer!Meta&UIUC提出通用分割模型,性能优于任务特定模型!开源!...
行业案例|数字化经营底座助力寿险行业转型
Mathematical analysis_ Notes_ Chapter 11: Fourier series
微服务远程Debug,Nocalhost + Rainbond微服务开发第二弹
Wireshark analyzes packet capture data * cap
C语言中匿名的最高境界
Nat address translation
Desci: is decentralized science the new trend of Web3.0?
强化学习-学习笔记8 | Q-learning
线程池的拒绝策略
Skills of embedded C language program debugging and macro use
持续测试(CT)实战经验分享
[paper sharing] where's crypto?