[linux device driver]Chapter 03:Scull_load中涉及到的群组权限之staff\wheel
2015-03-18 09:37
330 查看
UID。User Identifier (UID) 是用户的数字标识符。
GID。Group Identifier (GID) 与 UID 相似,但是它与组相关联。GID 在 /etc/group 中定义。wheel和staff都是GID的概念。从/etc/group里可以找到wheel或者staff.
wheel 组的概念
wheel 组的概念继承自 UNIX。当服务器需要进行一些日常系统管理员无法执行的高级维护时,往往就要用到 root 权限;而“wheel” 组就是一个包含这些特殊权限的用户池;也就是说,如果你不是“wheel”组的成员,就无法取得 root 权限进行一些特权的操作;
为什么需要 wheel 组?
通常在UNIX下,即使我们是系统的管理员,也不推荐用 root 用户登录来进行系统管理。一般情况下用普通用户登录,在需要 root 权限执行一些操作时,再 su 登录成为 root 用户。但是,任何人只要知道了 root 的密码,就都可以通过 su 命令来登录为 root 用户——这无疑为系统带来了安全隐患。所以,将普通用户加入到 wheel 组,被加入的这个普通用户就成了管理员组内的用户,但如果不对一些相关的配置文件进行配置,这个管理员组内的用户与普通用户也没什么区别——就像警察下班后,没有带枪、穿这便衣和普通人(用户)一样,虽然他的的确确是警察。
如何把用户加入 wheel 组?
前面说了,除了 root 用户,只有 wheel 组的成员有特权执行高级操作,那么怎么把用户提升成为 wheel 用户组成员呢?
可以使用 vigr 来编辑 /etc/group 文件,将新的用户名追加到 wheel 组的末尾,就像这样:
wheel::10:root,kc
The wheel group is used to control those people that can su to the root user (though this is made irrelevant by the sudo command).
All of the users on your system will be in the staff group, so by changing group ownership of files to staff the group permissions will apply to all users. All of the administrators on your system will be
in the wheel group, so by changing group ownership of the files to wheel group permissions will apply to all of the administrators, global permissions will apply to any other users.
My advice is that, except for files that you have created, you leave the group ownership and permissions alone. Unix is very particular about file ownership and permissions in certain areas and changing them
only leads to trouble.
wheel 是一个特殊的可以使用 su 切换到 root 的用户组;而 staff 组是所有普通用户的集合
GID。Group Identifier (GID) 与 UID 相似,但是它与组相关联。GID 在 /etc/group 中定义。wheel和staff都是GID的概念。从/etc/group里可以找到wheel或者staff.
wheel 组的概念
wheel 组的概念继承自 UNIX。当服务器需要进行一些日常系统管理员无法执行的高级维护时,往往就要用到 root 权限;而“wheel” 组就是一个包含这些特殊权限的用户池;也就是说,如果你不是“wheel”组的成员,就无法取得 root 权限进行一些特权的操作;
为什么需要 wheel 组?
通常在UNIX下,即使我们是系统的管理员,也不推荐用 root 用户登录来进行系统管理。一般情况下用普通用户登录,在需要 root 权限执行一些操作时,再 su 登录成为 root 用户。但是,任何人只要知道了 root 的密码,就都可以通过 su 命令来登录为 root 用户——这无疑为系统带来了安全隐患。所以,将普通用户加入到 wheel 组,被加入的这个普通用户就成了管理员组内的用户,但如果不对一些相关的配置文件进行配置,这个管理员组内的用户与普通用户也没什么区别——就像警察下班后,没有带枪、穿这便衣和普通人(用户)一样,虽然他的的确确是警察。
如何把用户加入 wheel 组?
前面说了,除了 root 用户,只有 wheel 组的成员有特权执行高级操作,那么怎么把用户提升成为 wheel 用户组成员呢?
可以使用 vigr 来编辑 /etc/group 文件,将新的用户名追加到 wheel 组的末尾,就像这样:
wheel::10:root,kc
The wheel group is used to control those people that can su to the root user (though this is made irrelevant by the sudo command).
All of the users on your system will be in the staff group, so by changing group ownership of files to staff the group permissions will apply to all users. All of the administrators on your system will be
in the wheel group, so by changing group ownership of the files to wheel group permissions will apply to all of the administrators, global permissions will apply to any other users.
My advice is that, except for files that you have created, you leave the group ownership and permissions alone. Unix is very particular about file ownership and permissions in certain areas and changing them
only leads to trouble.
wheel 是一个特殊的可以使用 su 切换到 root 的用户组;而 staff 组是所有普通用户的集合
相关文章推荐
- [linux device driver]Chapter 03:scull_load中涉及到的bash命令 exit
- [linux device driver] Chapter 03:以scull_load为引,详解Bash的位置参数和内部参数
- [linux device driver] Chapter 03:从scull_load学习小括号,中括号,和大括号的区别
- [linux device driver] Chapter 03:scull_load脚本理解
- [linux device driver] Chapter 03:以scull_load为例,讲解bash中反单引号`、双引号等的作用
- [linux device driver] Chapter 03:从scull_load了解awk
- [linux device driver] Chapter 03:以scull_load为例,详解mknod命令
- [linux device driver] Chapter 03:以scull_load为引,详解shell逻辑运算、基本运算、位运算
- [linux device driver] Chapter 03:字符设备注册学习
- [linux device driver] Chapter 03:scullc_open理解
- [linux device driver] Chapter 03:IS_ERR的理解
- [linux device driver] Chapter 03:make输出重定向
- Linux_shell_文件安全与权限(03)
- <03>Linux用户和组及权限
- Linux学习-03-文件与目录的权限-2
- LINUX字符设备驱动程序实例(chapter3 scull)
- Linux 中的 wheel 组和 staff 组
- 03_04 Linux用户及权限详解(上)
- linux----7----用户群组和权限
- linux中的staff和wheel