ldap認證用戶,nfs根據登入用戶信息漫遊用戶家目錄

yum install openldap-* yum install db4* slappassed -h{SSHA} -s  123456  #生成123456的SSHA的密碼 {SSHA}V2M5LK8Ae6o1bieZTC4JKglO2SB3EoDr vi /etc/openldap/slapd.conf    access to attrs=shadowLastChange,userPassword          by self write          by * auth     access to *          by * read    suffix          "dc=webwlan,dc=net"    rootdn          "cn=root,dc=webwlan,dc=net"    rootpw {SSHA}V2M5LK8Ae6o1bieZTC4JKglO2SB3EoDr    loglevel    296    cachesize   1000    checkpoint  2048  10 vi /etc/syslog.conf    local4.debug                  /var/log/slapd.log    #最後加入以上代碼 service syslog restart cp /etc/openldap/DB_CONFIG.example /var/lib/ldap/DB_CONFIG service ldap restart chkconfig --level 345 ldap on mkdir /home/lhome chmod o+w /home/lhome/ vi /etc/exports    /home/lhome 192.168.0.*(rw)   service nfs restart chkconfig --level 345 nfs on groupadd ldapusers useradd -g ldapusers -d /home/lhome/tonyzhang tonyzhang passwd tongyzhang cd /usr/share/openldap/migration/ vi migrate_common.ph  #編輯主配置文件     # Default DNS domain     $DEFAULT_MAIL_DOMAIN = "webwlan.net";  #修改參數     # Default base     $DEFAULT_BASE = "dc=webwlan,dc=net";   #修改參數 ./migrate_base.pl > webwlan.ldif    #生成默認結構的模板 #將生成的webwlan.ldif模板導入到openldap數據庫 ldapadd -x -D "cn=root,dc=webwlan,dc=net" -W -f webwlan.ldif #將系統組導入ldap數據庫 grep ldapusers /etc/group > grp.in ./migrate_group.pl grp.in >grp.ldif ldapadd -x -D "cn=root,dc=webwlan,dc=net" -W -f grp.ldif #將用戶導入ldap數據庫 grep tonyzhang /etc/passwd > usr.in ./migrate_passwd.pl usr.in > usr.ldif ldapadd -x -D "cn=root,dc=webwlan,dc=net" -W -f usr.ldif #經過ldap提供的ldapsearch命令查詢導入參數是否成功 ldapsearch -x -b "dc=webwlan,dc=net"   客戶端配置--PC上設置好比Federo的客戶端系統 setup---》驗證配置 [*]使用LDAP    [*]使用MD5                                [*]使用屏蔽口令                [*]使用LDAP驗證   ---》下一步  []使用TLS  不選擇 服務器: ldap://127.0.0.1   (或者指向ldap服務器所在ip地址) 基本DN: dc=webwlan,dc=net showmount -e IP    #查看IP地址的 mkdir /home/lhome chmod o+w /home/lhome vi /etc/auto.master     /misc  /etc/auto.misc     /home/lhome   /etc/lhome.misc vi /etc/lhome.misc     * -fstype=nfs,rw  192.168.0.242:/home/lhome/&      #ip地址爲服務器上提供openldap的ip地址 service autofs restart
相關文章
相關標籤/搜索