成人午夜视频全免费观看高清-秋霞福利视频一区二区三区-国产精品久久久久电影小说-亚洲不卡区三一区三区一区

Kerberos+LDAP+NFSv4實(shí)現(xiàn)單點(diǎn)登錄(中)

Kerberos+LDAP+NFSv4 實(shí)現(xiàn)單點(diǎn)登錄(中)

金壇網(wǎng)站建設(shè)公司創(chuàng)新互聯(lián)公司,金壇網(wǎng)站設(shè)計(jì)制作,有大型網(wǎng)站制作公司豐富經(jīng)驗(yàn)。已為金壇1000多家提供企業(yè)網(wǎng)站建設(shè)服務(wù)。企業(yè)網(wǎng)站搭建\成都外貿(mào)網(wǎng)站建設(shè)公司要多少錢(qián),請(qǐng)找那個(gè)售后服務(wù)好的金壇做網(wǎng)站的公司定做!

五.nfs服務(wù)器的安裝
1.安裝nfs-kernel-server
root@debian:~# apt-get install nfs-kernel-server nfs-common

修改/etc/default/nfs-kernel-server文件

NEED_SVCGSSD=""
改為
NEED_SVCGSSD="yes"

重啟nfs-kernel-server

root@debian:~# /etc/init.d/nfs-kernel-server stop
root@debian:~# /etc/init.d/nfs-kernel-server start
root@debian:~# ps -e |grep gss
10275 ?        00:00:00 rpc.svcgssd

2.安裝libnss-ldapd、nslcd
為了獲取ldap用戶(hù)信息,要安裝libnss-ldapd、nslcd
在新立得選上libnss-ldapd、nslcd會(huì)自動(dòng)將libpam-ldapd、nscd、nslcd-utils三個(gè)包打上安裝標(biāo)記,可手工將該三個(gè)包去掉安裝標(biāo)記,不需此三個(gè)包

root@debian:~# apt-get install libnss-ldapd nslcd

注意安裝nslcd配置過(guò)程中,提示輸入LDAP服務(wù)器地址的輸入框默認(rèn)了uri ldapi:/// ,一定要將 ldapi 改為 ldap ,因?yàn)閘dapi:///表示用在unix域

1)nslcd
安裝過(guò)程中
ldap server uri 填 ldap://192.168.1.101/
ldap服務(wù)器搜索起點(diǎn) 填 dc=ctp,dc=net

查看配置文件

root@debian:~# cat /etc/nslcd.conf
#The user and group nslcd should run as.
uid nslcd
gid nslcd

#The location at which the LDAP server(s) should be reachable.
#填LDAP服務(wù)器地址,即kdc服務(wù)器地址
uri ldap://192.168.1.101/

#The search base that will be used for all queries.
base dc=ctp,dc=net

root@debian:~#

2)libnss-ldapd
安裝過(guò)程中
name services to configure 選 [*] passwd

新建測(cè)試目錄
root@debian:~# mkdir /home/linlin/share

將該目錄屬性改為用戶(hù)ID及用戶(hù)組ID都為4001,即為ldap用戶(hù)krblinlin的uidNumber/gidNumber,但并在nfs客/服兩主機(jī)本地不存在該ID用戶(hù)
root@debian:~# chown 4001:4001 /home/linlin/share

2.1)假定沒(méi)選[*] passwd

linlin@debian:~$ ls -ld /home/linlin/share
drwxr-xr-x 2 4001 4001 4096 9月  18 21:13 /home/linlin/share

則取不到ldap用戶(hù)信息

2.2)可重設(shè)libnss-ldapd,選上[*] passwd
root@debian:~# dpkg-reconfigure libnss-ldapd

...
┌───────────┤  正在設(shè)定 libnss-ldapd  ├──────────────────────────┐  
│  For this package to work, you need to modify the /etc/nsswitch.conf file to use the ldap datasource. │  
│  You can select the services that should have LDAP lookups enabled. The new LDAP lookups will be added│
│as the last datasource. Be sure to review these changes.                                               │  
│  Name services to configure:                                                                          │  
│    [ ] hosts                                                                                          │  
│    [ ] netgroup                                                                                       │  
│    [ ] networks                                                                                       │  
│    [*] passwd                                                                                         │  
│    [ ] protocols                                          
...

/etc/nsswitch.conf: enable LDAP lookups for passwd
root@debian:~#

查看配置文件,可見(jiàn)passwd一行后添加了ldap

root@debian:~# cat /etc/nsswitch.conf
passwd:         compat ldap
group:          compat
shadow:         compat
gshadow:        files

hosts:          files mDNS4_minimal [NOTFOUND=return] dns
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis
root@debian:~#
linlin@debian:~$ ls -ld /home/linlin/share
drwxr-xr-x 2 krblinlin 4001 4096 9月  18 21:13 /home/linlin/share

則已獲取顯示ldap用戶(hù)信息,krblinlin為ldap用戶(hù),同時(shí)也是Kerberos用戶(hù)
獲取用戶(hù)信息很重要,因?yàn)閚fs客/服兩端的認(rèn)證用戶(hù)信息要匹配,即兩邊的域+用戶(hù)名要一致

注:本實(shí)驗(yàn)只獲取ldap用戶(hù)的用戶(hù)名,無(wú)法獲取ldap用戶(hù)的所屬用戶(hù)組名(如上仍顯示用戶(hù)組ID 4001),但不影響實(shí)驗(yàn)效果

3.網(wǎng)絡(luò)共享
本實(shí)驗(yàn)?zāi)康腘FSv4認(rèn)證采用安全性強(qiáng)的gss/krb5認(rèn)證(Kerberos),而不是弱的系統(tǒng)認(rèn)證(AUTH_SYS)

編輯/etc/exports文件

root@debian:~# cat /etc/exports
/home/linlin/share  gss/krb5(rw,sync,no_subtree_check)
root@debian:~#

執(zhí)行導(dǎo)出
root@debian:~# exportfs -r

查看導(dǎo)出

root@debian:~# exportfs -v
/home/linlin/share
        gss/krb5(rw,wdelay,root_squash,no_subtree_check,sec=sys,rw,root_squash,no_all_squash)
root@debian:~#

4.問(wèn)題解決
nfs服務(wù)器沒(méi)有啟動(dòng)rpc.idmapd,導(dǎo)致nfs客戶(hù)機(jī)沒(méi)寫(xiě)權(quán)限
1)

root@debian:~# rpc.idmapd
rpc.idmapd: libnfsidmap: using (default) domain: ctp.net
rpc.idmapd: libnfsidmap: Realms list: 'CTP.NET'
rpc.idmapd: libnfsidmap: loaded plugin /lib/x86_64-linux-gnu/libnfsidmap/nsswitch.so for method nsswitch

root@debian:~# ps -e|grep rpc
  634 ?        00:00:00 rpciod
  757 ?        00:00:00 rpcbind
 1188 ?        00:00:00 rpc.svcgssd
 1261 ?        00:00:00 rpc.mountd
root@debian:~#

手工運(yùn)行rpc.idmapd仍沒(méi)啟動(dòng)rpc.idmapd

2)
原來(lái)nfs服務(wù)器的nfs-common要重啟

root@debian:~# /etc/init.d/nfs-common stop
root@debian:~# /etc/init.d/nfs-common start

root@debian:~# ps -e|grep rpc
  634 ?        00:00:00 rpciod
  757 ?        00:00:00 rpcbind
14256 ?        00:00:00 rpc.svcgssd
14258 ?        00:00:00 rpc.mountd
15023 ?        00:00:00 rpc.statd
15041 ?        00:00:00 rpc.idmapd
root@debian:~#

nfs客戶(hù)機(jī)已可寫(xiě)權(quán)限了

網(wǎng)頁(yè)題目:Kerberos+LDAP+NFSv4實(shí)現(xiàn)單點(diǎn)登錄(中)
當(dāng)前地址:http://jinyejixie.com/article42/jjpdec.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供、企業(yè)網(wǎng)站制作、商城網(wǎng)站、網(wǎng)站改版云服務(wù)器、網(wǎng)頁(yè)設(shè)計(jì)公司

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話(huà):028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

綿陽(yáng)服務(wù)器托管
亳州市| 福泉市| 怀集县| 炉霍县| 宁都县| 黄梅县| 天长市| 五河县| 浙江省| 化德县| 筠连县| 江北区| 苏州市| 秀山| 庆安县| 缙云县| 汉中市| 安丘市| 秀山| 黄梅县| 泽普县| 余姚市| 云浮市| 甘泉县| 正镶白旗| 呼伦贝尔市| 崇信县| 铁岭县| 建阳市| 鹰潭市| 莱阳市| 乐陵市| 遵义县| 屯门区| 云龙县| 什邡市| 许昌县| 龙泉市| 临夏县| 长沙市| 宜城市|