当前位置:网站首页>2022.07.04
2022.07.04
2022-07-07 17:01:00 【ifuudoudou】
课时13


在建立新的用户时我又犯了一个错误,必须要将面板调整到root目录下,但是调整到root目录下需要认证密码。认证密码时显示authentication failure,所以要重新用sudo passwd root这个指令来认证密码。
![]()
现在用户创建完毕后,这里会默认创建一个用户组。
那么这个用户组在哪里呢?
可以用cat /etc/group来查看。
![]()
可以看到如果创建用户的时候,不指定一个组的话,会默认为创建一个跟用户名一样的组。
由于root权限是最高的,所以id是0.
那么如何把这个test01的用户组给修改呢?

通过usermod -g root test01就把test01这个用户给移动到root这个组了。
那么有时候,一个用户同时归属于多个用户组,又该如何做呢?
这就要用到追加了。

只是注意在追加时,-g必须要用大写的-G。
那么如何直接创建用户组呢?


创建。
将test01追加到test02的用户组里面。
![]()
删除组之后,用户所属的组的信息也会更新。
课时14
那么如何修改组呢?

首先修改id很简单,直接用“groupmod -g 修改的id 组名”就可以了。
修改组名就直接用“groupmod -n 修改的组名 原来的组名”就可以了。
课时15 权限设置


首先切换回自己的用户,然后ll查看详细信息。
可以看到第一个信息就是文件类型,d开头的就是目录, -就是普通文件。
rwx代表用户的权限,-xr是用户组的权限,以后就是其他权限。
在我使用 vim 建立新文件的时候出了一个错误。

显示为要我输入详细指令(我试着输入了sudo 也没有用)
然后我尝试了vim.tiny解决。
记住在编辑文件时,i是进入输入文本模式,esc推出文本模式之后,按:键,然后输入wq才能保存并推出。


那么可以看出,这个新添加的文件,只有当前的用户有rw(读写)的权限,其他用户只有读的权限。
要如何把其他用户的权限取消或者增加呢?

可以看到利用chmod就可以了。增加或者减去用符号。
那么如何对用户组设置权限呢?
对用户组权限设置差不多,但是要加一个-R利用递归来设置。
注意加第三项时,一定要用小o。
对目录设置权限也是一样的。可以利用—R递归来设置。

课时16 远程管理

输入ipconfig就可以在cmd里面查看自己的ip地址。
而在linux里面要输入ifconfig。

利用ping+网址就可以看返回的信息。ctrl+c取消。


为了实验,视频里面再安装了一台电脑。
他从快道里面用克隆直接建立了一个。


边栏推荐
猜你喜欢

清华、剑桥、UIC联合推出首个中文事实核查数据集:基于证据、涵盖医疗社会等多个领域
![Learn open62541 -- [67] add custom enum and display name](/img/98/e5e25af90b3f98c2be11d7d21e5ea6.png)
Learn open62541 -- [67] add custom enum and display name

Reuse of data validation framework Apache bval

Complete e-commerce system

Redis集群与扩展

Redis

【塔望方法论】塔望3W消费战略 - U&A研究法
![[software test] from the direct employment of the boss of the enterprise version, looking at the resume, there is a reason why you are not covered](/img/73/cbbe82fd6bdfa8177f5bfcf683010d.jpg)
[software test] from the direct employment of the boss of the enterprise version, looking at the resume, there is a reason why you are not covered

单臂路由和三层交换的简单配置

Reinforcement learning - learning notes 8 | Q-learning
随机推荐
Scientists have observed for the first time that the "electron vortex" helps to design more efficient electronic products
手把手教姐姐写消息队列
In the first half of 2022, I found 10 books that have been passed around by my circle of friends
3.关于cookie
我感觉被骗了,微信内测 “大小号” 功能,同一手机号可注册两个微信
Teach your sister to write the message queue hand in hand
PTA 1102 教超冠军卷
Draw squares with Obama (Lua)
Three forms of multimedia technology commonly used in enterprise exhibition hall design
[software test] from the direct employment of the boss of the enterprise version, looking at the resume, there is a reason why you are not covered
【Unity Shader】插入Pass实现模型遮挡X光透视效果
LeetCode 890(C#)
Wireshark analyzes packet capture data * cap
Sports Federation: resume offline sports events in a safe and orderly manner, and strive to do everything possible for domestic events
高温火烧浑不怕,钟薛高想留清白在人间
2022.07.02
Redis
抢占周杰伦
PTA 1102 teaching Super Champion volume
Learn open62541 -- [67] add custom enum and display name