GG修改器破解版下载地址:https://ghb2023zs.bj.bcebos.com/gg/xgq/ggxgq?GGXGQ
大家好,今天小编为大家分享关于给gg修改器root权限_gg修改器如何root权限的内容,赶快来一起来看看吧。
su 命令
用户切换。
su # 切换到root用户
su username # 切换到username用户
# su 后面加-时,会初始化当前用户的各种环境
su – username
# 指定用户执行某些命令
su – -c “touch /tmp/testfile02.txt” test06 # 以test06用户身份在/tmp
# 下创建了testfile02.txt
[root@centos01 ~]# su – -c “touch /tmp/testfile02.txt” test06
[root@centos01 ~]# ls -lt /tmp
total 124
-rw-rw-r–. 1 test06 test06 0 Sep 21 09:04 testfile02.txt
# 当要切换的用户没有家目录时
[root@centos01 ~]# useradd -M test08 # 创建不带家目录的用户test08
[root@centos01 ~]# su – test08 # 切换到test08,会有如下提示
su: warning: cannot change directory to /home/test08: No such file or directory
-bash-4.2$ pwd
/root
-bash-4.2$ logout
[root@centos01 ~]# id test08
uid=1006(test08) gid=1007(test08) groups=1007(test08)
[root@centos01 ~]# mkdir /home/test08 # 为test08创建家目录
[root@centos01 ~]# chown 1006:1007 /home/test08 #更改家目录有的用户及属组
[root@centos01 ~]# ls -l /home/test08 -d
drwxr-xr-x. 2 test08 test08 6 Sep 21 09:14 /home/test08
[root@centos01 ~]# su – test08 # 再次切换,还有提示,是因为缺少shell配置
Last login: Fri Sep 21 09:13:05 CST 2018 on pts/0
-bash-4.2$ pwd
/home/test08
-bash-4.2$ ls
-bash-4.2$ ls -a
. ..
[root@centos01 ~]# ls /etc/skel/ -la # 查看系统shell配置模板
total 24
drwxr-xr-x. 2 root root 59 Sep 7 09:48 .
drwxr-xr-x. 73 root root 8192 Sep 21 09:22 ..
-rw-r–r–. 1 root root 18 Jun 10 2014 .bash_logout
-rw-r–r–. 1 root root 193 Jun 10 2014 .bash_profile
-rw-r–r–. 1 root root 231 Jun 10 2014 .bashrc
[root@centos01 ~]# cp /etc/skel/.bash* /home/test08/ # 把模板拷贝到test08家目录
[root@centos01 ~]# id test08
uid=1006(test08) gid=1007(test08) groups=1007(test08)
[root@centos01 ~]# chown test08:test08 -R /home/test08/ #为这些配置文件更改用户及属组
[root@centos01 ~]# su – test08 # 再次切换,OK
Last login: Fri Sep 21 09:16:37 CST 2018 on pts/0
[test08@centos01 ~]$ # 普通用户shell最开始是$,root用户是#
sudo 命令
用su命令切换带root用户时,需要输入root用户的密码。这样很不安全,因此有了sudo命令。sudo可以让普通用户临时以指定用户的身份去执行一条命令。
visudo 打开sudo的配置文件(/etc/sudoers)。!!!不要使用vi命令直接打开,因为不会检查语法错误!!!
打开配置文件找到root ALL=(ALL) ALL
root 指定哪个用户有sudo 权限 左边的ALL指的是所有的主机,右边的ALL指的是获取哪个用户的 身份
第三段指可以使用sudo的命令有哪些,ALL表示所有的命令
在这行内容下面模仿写一条其他用户,就可以让该用户拥有sudo权限了。
test08 ALL=(ALL)/usr/bin/ls, /usr/bin/cat
[root@centos01 ~]# visudo #添加test08 ALL=(ALL) /usr/bin/ls, /usr/bin/cat
[root@centos01 ~]# su – test08 # 切换到test08
Last login: Sat Sep 22 05:27:12 CST 2018 on pts/1
[test08@centos01 ~]$ ls /root/ # 没有权限
ls: cannot open directory /root/: Permission denied
[test08@centos01 ~]$ sudo ls /root/
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great es great responsibility.
[sudo] password for test08: # 登录后第一次使用sudo时需要输入自身的密码
anaconda-ks.cfg a.txt d0917 link_test s_link0.log test.txt
[test08@centos01 ~]$ sudo ls /root/ # 之后不用再输入密码
anaconda-ks.cfg a.txt d0917 link_test s_link0.log test.txt
设置使用sudo 不需要密码 test07 ALL=(ALL)NOPASSWD: /usr/bin/ls, /usr/bin/cat
[root@centos01 ~]# visudo # 添加test07 ALL=(ALL) NOPASSWD: /usr/bin/ls, /usr/bin/cat
[root@centos01 ~]# su – test07
[test07@centos01 ~]$ sudo ls /root
anaconda-ks.cfg a.txt d0917 link_test s_link0.log test.txt
限制root用户通过ssh远程登录:
对应的配置文件是/etc/ssh/sshd_config,修改配置文件中的#PermitRootLogin yes为 PermitRootLogin no, 之后重启ssh服务 systemctl restart sshd.service
以上就是关于给gg修改器root权限_gg修改器如何root权限的全部内容,感谢大家的浏览观看,如果你喜欢本站的文章可以CTRL+D收藏哦。
gg修改器没有悬浮窗怎么办,gg修改器打开没有悬浮窗 大小:19.22MB9,094人安装 来源:名言网 更新 :2022.03.10 软件版本:GG修改器2020 V……
下载GG修改器中文吗,GG修改器中文版:让游戏玩家的世界更精彩 大小:17.80MB7,512人安装 游戏修改器是一款非常流行的游戏辅助工具,它可以帮助游戏玩家修改游戏内的各种参数……
下载gg修改器无root怎么做,轻松修改游戏,GG修改器助你无Root达成愿望 大小:11.82MB7,676人安装 对于许多游戏玩家而言,在玩游戏时碰到困难、卡关、收集道具困难等情况都是非常烦恼……
下载gg修改器99.0中文版_gg修改器99.0官方版本 大小:10.90MB8,737人安装 大家好,今天小编为大家分享关于gg修改器99.0中文版_gg修改器99.0官方版本的内容,……
下载gg修改器最新版8.99.0,赞美GG修改器最新版8.99.0的理由 大小:8.43MB7,741人安装 对于很多游戏爱好者来说,使用一些外挂和修改器,可以让游戏更加有趣,也能够帮助自……
下载gg修改器免root的_gg修改器免root怎么用? 大小:4.80MB8,611人安装 大家好,今天小编为大家分享关于gg修改器免root的_gg修改器免root怎么用?的内容,赶……
下载gg游戏修改器如何修改吃鸡,GG游戏修改器如何修改吃鸡优秀的游戏修改工具 大小:3.12MB7,302人安装 GG游戏修改器是一款非常出色的游戏修改工具,可以对各种游戏进行修改。其中,最为常……
下载gg修改器最新版本在哪下载,GG修改器最新版本助你畅游游戏世界 大小:7.04MB7,512人安装 作为一名游戏玩家,你是否曾经碰到过这样的场景,想要在游戏中获得更多资源、更好的……
下载gg修改器怎么绕过root_gg修改器最详细教程 大小:11.76MB8,711人安装 大家好,今天小编为大家分享关于gg修改器怎么绕过root_gg修改器最详细教程的内容,……
下载gg游戏修改器修改闪烁之光,玩转闪烁之光,GG游戏修改器无限开挂 大小:15.42MB7,768人安装 手游界中,闪烁之光无疑是一款备受瞩目的RPG游戏。而在玩家们的不断追求中,总会出……
下载