Authentication:认证
Authorized:授权
例如:当你登录一个服务器,输入用户名和密码,这个时候服务器要Authentication,登录进去后
能够完成什么事以及其他什么的,要Authorized。所以往下两篇文章将会介绍Linux上的NIS和pam。 
NIS:http://linux.vbird.org/linux_server/0430nis.php
PAM:
/etc/pam.conf(这个文件不存在)
    Service type control module-path module-arguments
        service
        this filename must be in lower case(服务名必须小写)
    
/etc/pam.d/service(必须小写)
    type control module-path module-arguments 
type 验证类型
 auth        :authentication,主要用来检验用户的身份验证
 account    :authorization,主要完成授权
 session    :session管理的是用户在这次登录期间PAM所给予的环境设置
 password    :主要就是修改/更改密码
 
 
 
example:
    这四个验证通常是有顺序的,不过也有例外。通常:先经过验证身份(auth)后,系统才能够通过用户的身份给予适当的授权与权限设置(account),而且登录与注销期间的环境才需要设置,才需要记录登录与注销的信息(session),如果在运行期间需要更改密码,才给予password的类型。 
control
    required:若成功则带有success的标志,失败则带有failure标志,但不论成功与失败都会继续后续的验证流程
    requisite:如果失败则终止后续的验证流程,这点是和required的不同
    sufficient:如果成功,则终止后续的查询,如果失败,则继续后续的认证,和requisite相反
    optional:只是个可选的
    include:我把这个权力移交给其他人
    substack
    
such as:
ok: this modules passed,keep checking
done:this modules passed,and return the final result to the application now
bad:the result is failed,keep checking
die:the result is failed,and return the failure result to the application now
ignore:the result will not affect the overall result
reset:ignore any results that have already been collected in the final result 
EXAMPLE:
required     [success=ok new_authtok_reqd=ok ignore=ignore default=bad]
requisite    [success=ok new_authtok_reqd=ok ignore=ignore default=die]
sufficient  [success=done new_authtok_reqd=done default=ignore]
optional     [success=ok new_authtok_reqd=ok default=ignore] 
module-path
/etc/pam.d/other:定义默认规则
更多直接参考《鸟哥的Linux私房菜》
gentent:http://blog.chinaunix.net/uid-7761148-id-2044672.html