中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

ldap網絡賬號

發布時間:2020-07-15 09:11:49 來源:網絡 閱讀:415 作者:MissLeejuan 欄目:網絡安全

######ldap網絡帳號#####
1.什么是ldap?
ldap目錄服務認證,和windows活動目錄類似,就是記錄數據的一種方式

2.ldap客戶端所須軟件
yum sssd krb5-workstation -y


3.如何開啟ldap用戶認證
authconfig-tui

                       ┌────────────────┤ Authentication Configuration ├─────────────────┐
                       │                                                                 │
                       │  User Information        Authentication                         │
                       │  [ ] Cache Information   [ ] Use MD5 Passwords                  │
                       │  [*] Use LDAP            [*] Use Shadow Passwords               │
                       │  [ ] Use NIS             [ ] Use LDAP Authentication            │
                       │  [ ] Use IPAv2           [*] Use Kerberos                       │
                       │  [ ] Use Winbind         [ ] Use Fingerprint reader             │
                       │                          [ ] Use Winbind Authentication         │
                       │                          [*] Local authorization is sufficient  │
                       │                                                                 │
                       │            ┌────────┐                      ┌──────┐             │
                       │            │ Cancel │                      │ Next │             │
                       │            └────────┘                      └──────┘             │
                       │                                                                 │
                       │                                                                 │
                       └─────────────────────────────────────────────────────────────────┘
                                                                                          


                              ┌─────────────────┤ LDAP Settings ├─────────────────┐
                              │                                                   │
                              │          [*] Use TLS                              │
                              │  Server: ldap://cla***oom.example.com/___________ │
                              │ Base DN: dc=example,dc=com_______________________ │
                              │                                                   │
                              │         ┌──────┐                ┌──────┐          │
                              │         │ Back │                │ Next │          │
                              │         └──────┘                └──────┘          │
                              │                                                   │
                              │                                                   │
                              └───────────────────────────────────────────────────┘
                                                                                   


                           ┌─────────────────┤ Kerberos Settings ├──────────────────┐
                           │                                                        │
                           │        Realm: EXAMPLE.COM_____________________________ │
                           │          KDC: cla***oom.example.com___________________ │
                           │ Admin Server: cla***oom.example.com___________________ │
                           │               [ ] Use DNS to resolve hosts to realms   │
                           │               [ ] Use DNS to locate KDCs for realms    │
                           │                                                        │
                           │          ┌──────┐                    ┌────┐            │
                           │          │ Back │                    │ Ok │            │
                           │          └──────┘                    └────┘            │
                           │                                                        │
                           │                                                        │
                           └────────────────────────────────────────────────────────┘
                                                                                    
<當出現以下報錯時>

                                 ┌────────────────┤ Warning ├─────────────────┐
                                 │                                            │
                                 │ To connect to a LDAP server with TLS       │
                                 │ protocol enabled you need a CA certificate │
                                 │ which signed your server's certificate.    │
                                 │ Copy the certificate in the PEM format to  │
                                 │ the '/etc/openldap/cacerts' directory.     │
                                 │ Then press OK.                             │
                                 │                                            │
                                 │                  ┌────┐                    │
                                 │                  │ Ok │                    │
                                 │                  └────┘                    │
                                 │                                            │
                                 │                                            │
                                 └────────────────────────────────────────────┘
                                                                               
時因為tls的證書缺失,需要到服務器端下載所需要的證書到/etc/openldap/cacerts,
用到的命令
wget http://172.25.254.254/pub/example-ca.crt

<測試>
getent passwd ldapuser1
如果用戶信息可以正常顯示,證明客戶端認成功。

4.自動掛載用戶家目錄
yum install autofs -y
vim /etc/autofs.master
/home/guests /etc/auto.ldap

vim /etc/auto.ldap
ldapuser1 172.25.254.254:/home/guests/ldapuser1
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
*  172.25.254.254:/home/guests/&

systemctl restart autofs
####建立腳本執行ldap####
vim set-ldap.sh
#!/bin/bash
echo "install software ing ..."
yum install sssd krb5-workstation autofs -y

echo "config ldap auth client ing ..."
authconfig \
--enableldap \
--enablekrb5 \
--disableldapauth \
--enableldaptls \
--ldaploadcacert=http://172.25.254.254/pub/example-ca.crt \
--ldapserver="cla***oom.example.com" \
--ldapbasedn="dc=example,dc=com" \
--krb5realm="EXAMPLE.COM" \
--krb5kdc="cla***oom.example.com" \
--krb5adminserver="cla***oom.example.com" \
--enablesssd \
--enablesssdauth \
--update \

echo "config ldap user\'s home directory"

echo /home/guests /etc/auto.ldap >> /etc/auto.master

echo "* 172.25.254.254:/home/guests/&" >> /etc/auto.ldap

systemctl restart autofs
systemctl enable autofs

echo "all is successful!"
:wq
sh set-ldap.sh   ##執行腳本



向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

错那县| 农安县| 蒙城县| 凤翔县| 星座| 南岸区| 涟水县| 辛集市| 九龙坡区| 庄河市| 新和县| 周宁县| 青海省| 方山县| 罗山县| 阿克苏市| 石首市| 富宁县| 松桃| 甘孜| 中江县| 天全县| 河南省| 巨野县| 怀远县| 松江区| 鹿泉市| 夏河县| 固始县| 景宁| 小金县| 佳木斯市| 焉耆| 民和| 贵德县| 甘洛县| 涡阳县| 曲靖市| 盱眙县| 德格县| 聂荣县|