名称解析: 名称解析 name;id 认证服务

nsswitch: network service switch

				   解析库:
					        文件、MySQL、NIS、LDAP、DNS
									
									通用框架、与各存储交互的实现
									        /usr/lib64/libnss_
									        配置文件
													 db:store1,store2......
													 每种存储中查找的结果状态:
													 
													etc/nsswitch.conf
													getent databases [entry]
													
						pam	:pluggable authentication modules
						        
										认证库:
										        文件  MySQL  ldap  NIS
														
														通用框架:与各存储交互实现,以及多种辅助功能
														           /lib64/security
														配置文件:/etc/pam.conf
														            /etc/pam.d*.conf
                                      每个应用使用一个单独的配置文件
																				配置文件格式
																				         type    control   modules-path   arguments
																								 
																								 type:按检查功能类别,
																								            auth:账号的认证和授权
																														account:与账号管理相关的非认证
																														password:用户修改密码时检查密码规则
																														session:用户获取到服务之前,或使用完之后要进行的一些附加刑操作
																									
																									control:同一种功能多个检查项之间如何进行组合:
																									            实现机制:
																															        1、使用一个关键词,optional  include required
																																			2、使用一到多个key-value形式的组合表示
																																			
																														  简单机制:
																															        required:不通过,其余通过也不通过
																																			requisite:一票否决,通过看其他
													                                            sufficient:一票通过,没通过看其他
														                                          optional:可选,
																																			include:包含相关文件中的相关类别
																																			
																															复杂机制:[status1=action1,status2=action2]
                                                                           status:返回状态
																																						 action:ok     done   die   ignore  bad   reset
																															modules-path:模块路径
																															              /lib64/security:
																															modules-argument:模块参数
																															
																									模块:
																									         1、pam_shells.so,检查是否为安全shell,/etc/shells
																													 2、pam_limits.so,
																													             模块通过读取配置文件
																																			         /etc/security/limits.conf
																																							 
																																							 <domain>      <type>  <item>         <value>
																																							          
																																							       domain:username  @group *(所有用户
																																										 type:
																																										         hard:由root设置,
																																														 soft:
																																											item:
																																														         nofile:最大打开文件数
																																																		 nproc:
																																							 /etc/security/limits.d
																													             ulimits:定义用户使用的资源,当前生效
																																			 
																																			    ulimit  -u	最大用户进程数
																																					           -n	最多的打开的文件描述符个数
																																										 
																									限制centos用户,只能在worktime 通过ssh远程连接本机
																									限制只有distro组内的用户到本机,