linux使用root创建用户,给用户设置权限
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash

·
使用新建的用户xuqiong,无法进行文件夹操作。
使用如下命令即可:
chmod 777 -R xuqiong
成功:
更多操作如下:
1. 创建用户:adduser test
2. 设置密码:passwd test然后就会提示输入密码
3. 创建分组:groupadd ver
4. 加入组:gpasswd -a test ver
5. 移除组:gpasswd -d test ver
6. 进入home文件分配权限:cd /home
7. 分配权限:chmod 777 -R test
8. 权限介绍:4=可读 2=可写 1=可执行
7 7 7
第一个7 是 文件所有者的权限
第二个7 是 文件所属组的权限
第三个7 是 其他用户的权限
7 = 4+2+1 表示有可读可写可执行
6 = 4+2 表示有可读可写权限
5 = 4+1 表示有可读可执行
9. 修改用户权限为root:修改/etc/passwd即可,把用户名的ID和ID组修改成0(不建议)如需root权限自行百度
10 切换用户:su test
参考:https://blog.csdn.net/xujiahn/article/details/83658291




A beautiful web dashboard for Linux
最近提交(Master分支:5 个月前 )
186a802e
added ecosystem file for PM2 4 年前
5def40a3
Add host customization support for the NodeJS version 4 年前
更多推荐
所有评论(0)