初涉wheel 组
入门
在一次处理su切换的问的时候出现一个问题,
[cheng1@localhost ~]$ su cheng2
密码:
su: 鉴定故障
[cheng1@localhost ~]$
试过很多次, 也是这样, 还找了很多文章, 那些哥们说的基本都是加sudo, 当然, 没效果。
后来查着查着发现su有一个wheel组和/etc/pam.d/su, 呃...
先看一下/etc/pam.d/su长什么样子
[root@localhost home]# cat -n /etc/pam.d/su
1 #%PAM-1.0
2 auth sufficient pam_rootok.so
3 # Uncomment the following line to implicitly trust users in the "wheel" group.
4 auth sufficient pam_wheel.so trust use_uid
5 # Uncomment the following line to require a user to be in the "wheel" group.
6 #auth required pam_wheel.so use_uid
7 auth substack system-auth
8 auth include postlogin
9 account sufficient pam_succeed_if.so uid = 0 use_uid quiet
10 account include system-auth
11 password include system-auth
12 session include system-auth
13 session include postlogin
14 session optional pam_xauth.so
[root@localhost home]#
第四行, 这家伙搞的鬼
下面引入Jan哥的一篇文章(非原创):Linux 中的 wheel 组和 staff 组
看了这个一切都明白了
就是服务器限制了su使用权限, 没办法, 也不能直接取消这个配置, 那么就直接把需要su的账号扔进wheel组里面
[root@localhost home]# usermod -G wheel cheng1
[root@localhost home]#
是G不是g, G是追加一个组, 而g是直接修改组, 区别很大
然后就一步达成了
[cheng1@localhost ~]$ su cheng2
[cheng2@localhost cheng1]$
区别出来了
[root@localhost home]# id cheng1 && id cheng2
uid=1002(cheng1) gid=1002(cheng1) 组=1002(cheng1),10(wheel)
uid=1003(cheng2) gid=1003(cheng2) 组=1003(cheng2)
初涉wheel 组的更多相关文章
- Linux 中的 wheel 组和 staff 组
wheel 组的概念 wheel 组的概念继承自 UNIX.当服务器需要进行一些日常系统管理员无法执行的高级维护时,往往就要用到 root 权限:而“wheel” 组就是一个包含这些特殊权限的用户池: ...
- 检查是否使用PAM认证模块禁止wheel组之外的用户su为root
编辑su文件(vi /etc/pam.d/su),在开头添加下面两行: auth sufficient pam_rootok.so 和 auth required pam_wheel.so group ...
- Linux中的Wheel组的作用
原文:http://www.360doc.com/content/11/0505/10/4644186_114496525.shtml Linux中的Wheel组的作用(用自己的话翻译的) (原文) ...
- linux wheel组
wheel 组的概念 wheel 组的概念继承自 UNIX.当服务器需要进行一些日常系统管理员无法执行的高级维护时,往往就要用到 root 权限:而“wheel” 组就是一个包含这些特殊权限的用户池: ...
- Linux/Unix 中 wheel 组的来源
使用过 Linux/Unix 的朋友应该知道,将用户添加都 wheel用户组,让用户可以通过在命令在前加 sudo 临时获取 root 用户的权限.但是有没有朋友会想知道为何这个用户组要交 wheel ...
- 只允许wheel组到用户才能使用 su命令
su只是切换到root用户, 不改变当前目录: su - 切换到root和改变目录到/root 修改用户到组: usermod gpasswd wheel组相当于windows的 Administra ...
- Mac 用户组:staff、 wheel、admin 的区别
所有的用户都属于 staff 组, 只有具有管理员性质的用户位于 wheel 组中. wheel 是一个特殊的用户组,该组的用户可以使用 su 切换到 root,而 staff 组是所有普通用户的集合 ...
- wheel和staff分组
1.只有属于wheel组的用户才可以用su登录为root 2. 具体设置步骤如下: 1)修改 /etc/pam.d/su 文件,找到"#auth required /lib/security ...
- linux中的staff和wheel
linux中的staff和wheel wheel组就类似于一个管理员的组通常在UNIX下,即使我们是系统的管理员,也不推荐用root用户登录来进行系统管理.一般情况下 用普通用户登录,在需要root权 ...
随机推荐
- Linux - ansible 安装
# 安装依赖 yum install rpm-build python2-devel sshpass PyYAML python-jinja2 python-paramiko python-six p ...
- 深入剖析虚拟DOM提升性能(Vue,React);
I.原始渲染方式(直接操作DOM): 1.state数据: 2.JSX模板: 3.数据 + 模板 相结合,生成真实的DOM来显示: 4.state发生改变: 5.数据 + 模板结合,生成真实的DOM来 ...
- ES6语法 Promise Iterator
类和对象 基本定义: class Parent{ constructor(name='lmx'){ //name= 默认值 this.name=name } } let v_parent = new ...
- Linux unalias命令 取消别名
unalias 提示:命令行处理别名仅为临时取消别名,重启系统后就失效了 [root@MongoDB ~]# alias |grep cp alias cp='cp -i' [root@MongoDB ...
- webpack(3)-管理资源
管理资源:(file-loader 和 url-loader 可以接收并加载任何文件,然后将其输出到构建目录) 加载css:style-loader.css-loader 以style的形式插入到he ...
- Cocos Creator cc.Button (脚本事件内容)
cc.Class({extends: cc.Component,properties: {}, onLoad: function () { var clickEventHandler = new cc ...
- 关于最小生成树(并查集)prime和kruskal
适合对并查集有一定理解的人. 新手可能看不懂吧.... 并查集简单点说就是将相关的2个数字联系起来 比如 房子 1 2 3 4 5 6 ...
- vue中使用vue-quill-editor及上传图片到自己服务器
第一步,下载依赖 cnpm install vue-quill-editor --save 第二步,再main.js里引入组件(我这里是全局注册) // 富文本编辑器 import VueQuillE ...
- G面经Prepare: Print Zigzag Matrix
For instance, give row = 4, col = 5, print matrix in zigzag order like: [1, 8, 9, 16, 17] [2, 7, 10, ...
- C语言中格式字符串
C语言中格式字符串的一般形式为: %[标志][输出最小宽度][.精度][长度]类型, 其中方括号[]中的项为可选项. 一.类型 我们用一定的字符用以表示输出数据的类型,其格式符和意义下表所示: 字符 ...