Linux系統管理:LDAP與NetApp儲存安全整合方法

來源:互聯網
上載者:User

許多資料中心都在網路檔案系統上建立更先進的檔案分享權限設定,該過程需要使用者帳號資訊驗證。如果正在使用Linux系統,那麼可以將NetApp儲存和LDAP整合,增強安全性。

大部分儲存的許可權控制都能與微軟的活動目錄授權整合,但為Linux系統配置Lightweight Directory Access Protocol(LDAP)整合卻並非易事。

安全的檔案分享權限設定需要使用者授權驗證,就如那些進階別資料共用和歸檔項目所要求的一樣。如果Linux使用者需要訪問這些共用,存放裝置首先必須要識別這些Linux使用者帳號。除了活動目錄,也可以使用LDAP整合,但LDAP的配置比較複雜。好訊息是NetAPP公司的儲存支援LDAP伺服器驗證整合。接著,你可以在儲存上設定檔案存取權限,就如你在本地Linux檔案伺服器那樣。

開始配置NetAPP儲存與LDAP整合。通過SSH登入NetAPP儲存的命令列模式。輸入priv set advanced命令,此命令可以讓你設定所有必須的安全參數。接著,輸入options ldap,可以查看當前設定情況(你也可以通過瀏覽器網頁的方式完成這些操作):

  1. ams5-fas2240-A*> options ldap 
  2. ldap.ADdomain 
  3. ldap.base dc=example,dc=com 
  4. ldap.base.group 
  5. ldap.base.netgroup 
  6. ldap.base.passwd 
  7. ldap.enable on 
  8. ldap.minimum_bind_level anonymous 
  9. ldap.name 
  10. ldap.nssmap.attribute.gecos gecos 
  11. ldap.nssmap.attribute.gidNumber gidNumber 
  12. ldap.nssmap.attribute.groupname cn 
  13. ldap.nssmap.attribute.homeDirectory homeDirectory 
  14. ldap.nssmap.attribute.loginShell loginShell 
  15. ldap.nssmap.attribute.memberNisNetgroup memberNisNetgroup 
  16. ldap.nssmap.attribute.memberUid memberUid 
  17. ldap.nssmap.attribute.netgroupname cn 
  18. ldap.nssmap.attribute.nisNetgroupTriple nisNetgroupTriple 
  19. ldap.nssmap.attribute.uid uid 
  20. ldap.nssmap.attribute.uidNumber uidNumber 
  21. ldap.nssmap.attribute.userPassword userPassword 
  22. ldap.nssmap.objectClass.nisNetgroup nisNetgroup 
  23. ldap.nssmap.objectClass.posixAccount posixAccount 
  24. ldap.nssmap.objectClass.posixGroup posixGroup 
  25. ldap.passwd ****** 
  26. ldap.port 389 
  27. ldap.servers ut01.example.local 
  28. ldap.servers.preferred ut01.example.local 
  29. ldap.ssl.enable off 
  30. ldap.timeout 20 
  31. ldap.usermap.attribute.unixaccount unixaccount 
  32. ldap.usermap.attribute.windowsaccount windowsaccount 
  33. ldap.usermap.base 
  34. ldap.usermap.enable off 

如果有任何參數設定錯誤,可以使用options ldap.base命令來設定正確的搜尋域:

  1. ams5-fas2240-A*> options ldap.base dc=commerce-hub,dc=local 

通過命令設定好搜尋域之後,需要從LDAP目錄服務中擷取資訊。getXXbyYY命令可以顯示系統是如何針對arnaud帳號進行驗證的:

  1. ams5-fas2240-A*> getXXbyYY getpwbyname_r arnaud 
  2. pw_name = arnaud 
  3. pw_passwd = {{******}} 
  4. pw_uid = 1002, pw_gid = 100 
  5. pw_gecos = 
  6. pw_dir = /home/arnaud 
  7. pw_shell = /bin/bash 
  8. ams5-fas2240-A*> getXXbyYY getpwbyname_r linda 
  9. pw_name = linda 
  10. pw_passwd = {{******}} 
  11. pw_uid = 1001, pw_gid = 100 
  12. pw_gecos = 
  13. pw_dir = /home/linda 
  14. pw_shell = /bin/bash 

儲存在對LDAP伺服器傳來的使用者帳號資訊驗證通過後;接著會確保其在所有層面都工作正常。修改nsswitch.conf檔案的配置資訊,需要具備讀寫權限,使用檔案編輯器開啟/etc/nsswitch.conf檔案。檔案中應該包含如下幾行內容:

  1. ams5-fas2240-B> wrfile /etc/nsswitch.conf 
  2. hosts: files dns nis 
  3. passwd: ldap files nis 
  4. netgroup: ldap files nis 
  5. group: ldap files nis 
  6. shadow: files nis 

現在,存放裝置已經可以通過LDAP伺服器獲得使用者資訊了。如此這般,NetApp儲存與LDAP伺服器使用者驗證整合後,可以正常控制網路檔案系統(NFS)共用的許可權設定。可以使用options nfs.v4.acl.enable命令切換NFSv4存取控制清單。你還可以將Linux系統的ACL應用在NetApp儲存上,這樣可以讓儲存更像Linux檔案目錄那樣,具備對應的許可權:

  1. ams5-fas2240-B> options nfs.v4.acl.enable on 

nfs.v4.acl.enable選項的變更會影響在佔用模式下高可用性配置中的所有成員。需要確保改參數和高可用配對中的成員許可權一致。

NetApp儲存現在已經完全與Linux環境整合,管理員們可以將其當作本地Linux檔案系統使用了。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.