在 Synology NAS 上使用 Google Secure LDAP

[本文參考 Synology 官方文件 How do I join my Synology NAS to Google Secure LDAP?]

教育版 Google Workspace for Education Fundamentals (GWEF) 也支援 Google Secure LDAP 了!也就是說伺服器可以綁定 Google Workspace 網域帳號作為登入或權限管制,逐步擺脫 AD 的限制。

Synology NAS 使用 Google Secure LDAP 的綁定方式如下:

1. 條件:

  • Google Workspace 版本需支援 Google Secure LDAP 服務,Education Fundamentals 是 OK 的。
  • 以管理員身份登入 Synology NAS。
  • Synology DSM 版本要 6.2.2 以上。

2. 設定 Google Secure LDAP 服務

  1. 在 Google Workspace 管理介面,前往 Apps > LDAP。
  2. 新增一組 LDAP clients 設定。
  3. 設定 LDAP client 權限:原則上 Verify user credential 和 Read user information 設為可檢閱整個網域(Entire Domain),並打開 Read group information 檢閱群組資訊。
  4. 用 Generate New Certificate 產生新的驗證憑證,下載憑證zip檔後解壓縮得到憑證(.crt)和金鑰(.key)。
  5. 接著按 Generate access credentials 產生存取憑證。
3. 設定 NAS

DSM 7
  1. 前往控制板 Control Panel > Domain/LDAP > Domain/LDAP。
  2. 按「加入(Join)」,設定如下:
    • Server type: 選 Auto-detect 或 LDAP
    • Server address: 輸入 ldap.google.com
    • 下一步
    • Bind DN or LDAP administrator account: 輸入 Google Secure LDAP 的管理員帳號
    • Password: 輸入 Google Secure LDAP 管理員密碼
    • Encryption: 選 SSL/TLS
    • Base DN: 輸入 Google Secure LDAP 所屬網域。若帳號是 synotest@syno.net 則網域是 syno.net,故 base DN 為 dc=syno,dc=net
    • Profile: 選 Standard
    • 勾選 Enable client certificate
    • 然後上傳剛剛下載的 client certificate。Certificate是.crt檔,Private Key是.key檔。
    • 下一步,待綁定檢查完成。
  3. 完成綁定後,回到 Domain/LDAP 分頁,按上方的 Edit。在進階 Advanced 分頁中:
    • 勾選 Enable CIFS plain text password authentication
    • 不要勾選 Expand nested groups

DSM 6.2.2
  1. 前往控制板 Control Panel > Domain/LDAP > LDAP。
  2. 啟用 Enable LDAP Client
  3. 設定數值如下:
    • LDAP Server address: 輸入 ldap.google.com
    • Encryption: 選 SSL/TLS
    • Base DN: 輸入網域,如 dc=syno,dc=net
    • Profile: 選 Standard
    • 勾選 Enable CIFS plain text password authentication
    • 勾選 Do not expand nested groups
    • 勾選 Enable client certificate
    • 然後上傳剛剛下載的 client certificate。Certificate是.crt檔,Private Key是.key檔。
    • 按 OK 儲存,按 Apply 套用。
  4. 當跳出對話框要求帳密時,輸入 Google Secure LDAP 的管理員帳密。
4. 取消 LDAP 綁定
  • DSM 7: 前往 Control Panel > Domain/LDAP > Domain/LDAP,勾選 Leave LDAP。
  • DSM 6.2.2: 前往 Control Panel > Domain/LDAP > LDAP,取消勾選 Enable LDAP Client。

留言

  1. 侯老師好,我是文泓
    四處逛逛意外看到老師 Blog 有 NAS 教學文很酷

    我個人也是 Synology NAS 的兩個月新用戶 :))
    也在陸續開發各種 NAS 潛力 (比如裝 Docker run Micro-Services)

    期待後續老師有很酷又實用的 NAS 使用分享

    回覆刪除

張貼留言