1 / 17

Red Hat Linux 系统管理 RH130

Red Hat Linux 系统管理 RH130. 第八章 高级用户管理 Advanced User Administration. 学习目标. 本单元学习结束后 , 你应该能 使用 NLS 和 LDAP 访问集中定义的网络用户 定义访问控制列表 设置文件系统限额 理解 SElinux 基础. 网络用户. 用户信息可以在远程服务器上集中存储和管理 对于每一个用户帐号 , 有两种信息是必须提供的 : 帐户信息 : UID 号 , 缺省 shell, home 目录 组成员及其它相关信息 认证 : 验证登录时提供的密码是否正确的一种方式

andres
Download Presentation

Red Hat Linux 系统管理 RH130

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Red Hat Linux系统管理RH130

  2. 第八章 高级用户管理Advanced User Administration

  3. 学习目标 • 本单元学习结束后,你应该能 • 使用NLS和LDAP访问集中定义的网络用户 • 定义访问控制列表 • 设置文件系统限额 • 理解SElinux基础

  4. 网络用户 • 用户信息可以在远程服务器上集中存储和管理 • 对于每一个用户帐号,有两种信息是必须提供的: • 帐户信息: UID 号, 缺省shell, home 目录 组成员及其它相关信息 • 认证: 验证登录时提供的密码是否正确的一种方式 • NSS: 名称服务切换 • getent database[record] • PAM –插入式认证模块

  5. 认证配置 • system-config-authentication • 用于配置认证的GUI工具 • 基于字符环境的工具为authconfig-tui • 加载authconfig-gtk RPM • 支持的帐户信息服务: • 本地文件,NIS,LDAP,Hesiod,WinBind • 支持的认证机制 • (NSS), Kerberos, LDAP, SmartCard, SMB, Winbind

  6. 实例: NIS配置 • 必须安装ypbind和portmap的RPM包 • 运行system-config-authentication • 启用NIS用于提供用户信息 • 指定NIS服务器和NIS域名 • 保持缺省的认证(通过NSS) • 实际上是怎样实现的? • 修改了5个文本格式的配置文件

  7. 实例:LDAP配置 • 必须安装nss_ldap和openldap的RPM包 • 运行system-config-authentication • 启用LDAP用于提供用户信息 • 指定服务器,搜索的base dn和TLS • 启用LDAP用于提供认证 • 实际上是怎样实现的? • 修改了5个文本格式的配置文件

  8. 文件系统支持(ACL) • Linux不允许用户chown文件 • ACL可以让用户共享文件而不用冒着风险设置文件权限chmod 777 • 使用mount选项实现 • mount -o acl /mountpoint • 在安装期间设置文件系统 • tune2fs -l /dev/sda1 | grep options

  9. 访问控制列表(ACLs) • 为多个用户或组赋予文件和目录rwx的访问权限 • getfacl file|directory • setfacl -m u:gandolf:rwx file|directory • setfacl -m g:nazgul:rw file|directory • setfacl -m d:u:frodo:rw directory • setfacl -x u:samwise file|directory • 自动ACL设定 • 新文件从目录继承缺省ACL(如果存在) • Mv命令和cp命令中的-p选项会维持原有ACL

  10. 配置配额系统性 • 概述 • 在内核中实现配额 • 在单个的文件系统上实现 • 针对每个组或用户具有单独的策略 • 对块(blocks)或节点(inodes)的数量进行限制 • 可以实现软限制或硬限制 • 初始化 • 分区mount选项:usrquota, grpquota • 初始化数据库: quotacheck -cugm /filesystem

  11. 为用户设置配额 • 实现方法: • 启用和停止配额: quotaon, quotaoff • 直接修改配置: edquota username • 从shell设置: setquotausername409651204050/foo • 定义模板用户 edquota-puser1user2

  12. 配置状态报告 • 报告 • 用户审查: quota • 配额总览: repquota • 综合工具: warnquota

  13. SELinux • 强制访问控制(Mandatory Access Control, MAC)及自主访问控制(DiscretionaryAccess Control, DAC) • 一个规则集,称之为“策略”,决定了控制的严格程度 • 进程可以是约束或无约束 • 策略定义了哪些资源可以被约束的进程访问 • 任何操作如果不是被明确的允许,那么缺省就是被拒绝

  14. SElinux安全上下文 • 所有文件和进程拥有一个安全上下文 • 上下文有多种要素,依赖于安全的需要: • user:role:type:sensitivity:category • user_u:object_r:tmp_t:s0:c0 • 不是所有的系统会显示s0:c0 • ls -Z • ps -Z • 经常与其它选项一起使用,比如-e

  15. SELinux:针对性策略 • 针对性策略(Targeted Policy)在安装时被装载 • 大多数本地进程是未约束的 • 主要使用类型元素进行类型强制(type enforcement) • 安全上下文可以用chcon来改变 • chcon -t tmp_t /etc/hosts • 使用restorecon更安全 • restorecon /etc/hosts

  16. SELinux:管理 • 模式: Enforcing, Permissive, Disabled • /etc/sysconfig/selinux • system-config-securitylevel • getenforce 和 setenforce 0 | 1 • 从GRUB 控制: selinux=0 • 策略调整: • system-config-selinux (包含在policycoreutils-gui 中) • getsebool 和 setsebool • semanage

  17. 第八章结束 • 自由提问 • 小结 • 设置NIS 和 LDAP • 使用 ACLs • 文件系统配额 • 配置SELinux和故障检测

More Related