本篇文章給大家分享的是有關(guān)如何從零構(gòu)建ipa-server實(shí)現(xiàn)ldap+kerberos網(wǎng)絡(luò)用戶驗(yàn)證,小編覺得挺實(shí)用的,因此分享給大家學(xué)習(xí),希望大家閱讀完這篇文章后可以有所收獲,話不多說,跟著小編一起來看看吧。
成都創(chuàng)新互聯(lián)公司于2013年開始,先為集安等服務(wù)建站,集安等地企業(yè),進(jìn)行企業(yè)商務(wù)咨詢服務(wù)。為集安企業(yè)網(wǎng)站制作PC+手機(jī)+微官網(wǎng)三網(wǎng)同步一站式服務(wù)解決您的所有建站問題。
1.1隨著現(xiàn)在網(wǎng)絡(luò)的發(fā)展,在企業(yè)中主機(jī)也越來越多,主機(jī)用戶管理變成一件很艱難的任務(wù),
一種解決方式,賬號(hào)信息不存放在本地系統(tǒng)中,而是賬號(hào)信息存儲(chǔ)在一個(gè)中心位置,實(shí)現(xiàn)用戶的集中管理。
單點(diǎn)登錄(single sign on )簡稱SSO,是目前比較流行的企業(yè)業(yè)務(wù)整合的解決方案之一,
SSO的定義是定義在多個(gè)應(yīng)用系統(tǒng)中,用戶只需要登錄一次就可以訪問所有信任的應(yīng)用系統(tǒng)。
存儲(chǔ)賬號(hào)信息流行的解決方案:LADP,NIS,AD或IPA-server
ldap服務(wù) kerberos 是一種網(wǎng)絡(luò)認(rèn)證協(xié)議,僅提供SSO認(rèn)證服務(wù),通常和LDAP一起使用。
典型的實(shí)現(xiàn)方案:AD(微軟活動(dòng)目錄)和IPA-server
一臺(tái)物理主機(jī),兩臺(tái)vm虛擬機(jī),系統(tǒng)為redhat7.0以上(安裝了圖形界面的)。
物理主機(jī)的地址為:ip:192.168.0.111/24 gw:192.168.0.1 DNS192.168.0.1 地址可以根據(jù)自己的情況而定
第一臺(tái)虛擬機(jī):網(wǎng)卡類型為自動(dòng)橋接:ip:192.168.0.118/24 gw:192.168.0.1 dns 可以暫時(shí)不用配置。這臺(tái)虛擬機(jī)我們將要它配置成ipa-server
第二臺(tái)虛擬機(jī):網(wǎng)卡類型為自動(dòng)橋接:ip:192.168.0.119/24 gw;192.168.0.1 dns:192.168.0.118
1,必須要有完整的主機(jī)名
2,一個(gè)靜態(tài)的ip地址
3,能夠?qū)χ鳈C(jī)名做解析(正向和反向解析)
4,hosts文件也要對(duì)主機(jī)名做解析。不能解析到127.1
5,開通防火墻規(guī)則和服務(wù)
6, 做時(shí)間ntp同步
1,設(shè)置主機(jī)名為server.zhuxu.co
[root@server ~]# hostnamectl set-hostname server.zhuxu.co
[root@server ~]# hostname server.zhuxu.co
2,一個(gè)靜態(tài)的ip地址上面準(zhǔn)備工作已經(jīng)設(shè)置好了
3,能夠?qū)χ鳈C(jī)名做解析(正向和反向解析)這步不用做,安裝ipa-server,會(huì)自動(dòng)配置dns服務(wù)
4,vim /etc/hosts 文件,添加 192.168.0.118 server.zhuxu.co server 這一行。
5,為了簡化步驟,直接關(guān)閉防火墻和selinux.(我會(huì)再另外發(fā)一個(gè)版本,加上防火墻的配置)[root@server ~]# iptables -F
清除iptables規(guī)則[root@server ~]# systemctl stop iptables
停止iptables服務(wù)[root@server ~]# systemctl disable iptables
禁止iptables 開機(jī)啟動(dòng)[root@server ~]# systemctl stop firewalld
停止firewalld 服務(wù)[root@server ~]# systemctl disable firewalld
禁止firewalld 開機(jī)啟動(dòng)[root@server ~]# setenforce 0
臨時(shí)關(guān)閉selinux
編輯/etc/selinux/conf
文件 SELINUX=permissive
6,vim /etc/chrony.conf
注釋前三個(gè)時(shí)間服務(wù),編輯最后一個(gè)為:server ntp1.aliyun.com iburst[root@server ~]#systemctl restart chronyd.service
重啟時(shí)間服務(wù)
7,配置好yum源,我這選擇掛載光盤來做yum倉庫。[root@server ~]# vim /etc/yum.repos.d/server.repo
在文件中輸入以下內(nèi)容
[base]name=redhat7baseurl=file:///mntenabled=1gpgcheck=0
掛載光盤到/mnt下(請(qǐng)確保光盤是連接狀況)[root@server ~]# mount /dev/cdrom /mnt
服務(wù)器端安裝條件準(zhǔn)備好了:
ipa-server 依賴于dns服務(wù)才能工作,我們要裝的包有:ipa-server bind bind-dyndb-ldap ipa-server-dns
bind 是提供dns服務(wù),bind-dyndb-ldap是提供dns和ldap連接組件等,
ipa-server-dns提供了ipa-server與dns連接組件等(根據(jù)安裝系統(tǒng)時(shí)候選的包不同,這個(gè)包有可能裝過了)
[root@server ~]# yum install -y ipa-server bind bind-dyndb-ldap ipa-server-dns
[root@server ~]# ipa-server-install --setup-dns ---安裝ipa-server自動(dòng)配置dnsServer host name [server.zhuxu.co]: ---回車鍵(默認(rèn)) Please confirm the domain name [zhuxu.co]: ---回車鍵(默認(rèn)) Please provide a realm name [ZHUXU.CO]: ---回車鍵(默認(rèn)) Directory Manager password: ---設(shè)置目錄管理的密碼 最少是8位 IPA admin password: ---設(shè)置ipa 管理員admin的密碼 最少8位 一定要記住,后面要用到 Do you want to configure DNS forwarders? [yes]: no ---你想配置dns為轉(zhuǎn)發(fā)器嗎? 選擇noDo you want to search for missing reverse zones? [yes]: yes --你想配置dns的反向域嗎?選擇yesContinue to configure the system with these values? [no]: yes --繼續(xù)配置系統(tǒng)其他的值? 選擇yes
[root@server ~]# systemctl enable sssd --開機(jī)自啟動(dòng)sssd服務(wù)(sssd:system security service deamon 系統(tǒng)安全服務(wù))[root@server ~]# systemctl start sssd --開啟sssd服務(wù)(可能默認(rèn)已經(jīng)開啟了)[root@server ~]# authconfig --enablemkhomedir --update 創(chuàng)建的用戶,默認(rèn)創(chuàng)建用戶家目錄,更新認(rèn)證信息
[root@server ~]# kinit admin ---必須要登陸admin 才能管理域Password for admin@ZHUXU.CO: [root@server ~]# ipa user-find --all 查看所有域用戶的信息1 user matched dn: uid=admin,cn=users,cn=accounts,dc=zhuxu,dc=co User login: admin .... Number of entries returned 1
[root@server ~]# dig -t a server.zhuxu.co 查看server.zhuxu.co 的A 記錄[root@server ~]# dig -t ptr 118.0.168.192.in-addr.apra 查看server.zhuxu.co 的PTR記錄
[root@server ~]# reboot
可以通過server.zhuxu.co 終端中的火狐輸入https://server.zhuxu.co/ipa/ui 來管理。
1,配置主機(jī)名
[root@client ~]# hostnamectl set-hostname client.zhuxu.co[root@client ~]# hostname client.zhuxu.co
2,設(shè)置一個(gè)靜態(tài)ip地址 dns一定要指向server.zhuxu.co 的ip
3,關(guān)閉防火墻同server端一樣
4,修改hosts文件,添加192.168.0.119 client.zhuxu.co client
5,做時(shí)間同步vim /etc/chrony.conf
注釋前三個(gè)時(shí)間服務(wù),編輯最后一個(gè)為:server ntp1.aliyun.com iburst
[root@server ~]#systemctl restart chronyd.service 重啟時(shí)間服務(wù)
6,配置好yum源,我這選擇掛載光盤來做yum倉庫。[root@server ~]# vim /etc/yum.repos.d/server.repo
在文件中輸入以下內(nèi)容
[base]name=redhat7baseurl=file:///mntenabled=1gpgcheck=0
掛載光盤到/mnt下(請(qǐng)確保光盤是連接狀況)
[root@server ~]# mount /dev/cdrom /mnt
[root@client ~]#authconfig-gtk
[root@client ~]# ipa-client-install --domain=zhuxu.co --no-ntp`--realm=ZHUXU.CO --mkhomedir
加入域,不啟用ntp,創(chuàng)建用戶時(shí)自動(dòng)創(chuàng)建家目錄
Continue to configure the system with these values? [no]: yes ---繼續(xù)配置系統(tǒng)其他的值? 選擇yes
User authorized to enroll computers: admin ---域管理員
Password for admin@ZHUXU.CO: ---密碼
[root@client ~]# ssh tom@client.zhuxu.co ---在客戶端實(shí)驗(yàn)登錄
Password: ---輸入密碼
Password expired. Change your password now. --提醒你密碼過期
Current Password: --輸入現(xiàn)用密碼
New password: ---新密碼
Retype new password:
Creating home directory for tom.
[tom@client ~]$ whoami --登陸成功
tom
[tom@client ~]$ pwd --在家目錄下,說明家目錄也是創(chuàng)建成功了。
/home/tom
所有配置結(jié)束,在網(wǎng)上搜索不到ipa-server 配置方法。這可能是在百度中找到的最全的配置方法了,還是從零構(gòu)建的。
以上就是如何從零構(gòu)建ipa-server實(shí)現(xiàn)ldap+kerberos網(wǎng)絡(luò)用戶驗(yàn)證,小編相信有部分知識(shí)點(diǎn)可能是我們?nèi)粘9ぷ鲿?huì)見到或用到的。希望你能通過這篇文章學(xué)到更多知識(shí)。更多詳情敬請(qǐng)關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道。
當(dāng)前文章:如何從零構(gòu)建ipa-server實(shí)現(xiàn)ldap+kerberos網(wǎng)絡(luò)用戶驗(yàn)證
本文路徑:http://www.rwnh.cn/article40/gjhpeo.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供App開發(fā)、Google、響應(yīng)式網(wǎng)站、網(wǎng)站導(dǎo)航、網(wǎng)站制作、電子商務(wù)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)