FreeIPA部署及基本使用

FreeIPA是一個集成安全信息管理解決方案,FreeIPA服務器經過存儲管理計算機網絡安全方面所需的用戶、組、主機和其餘對象的數據,提供集中的身份驗證、受權和帳戶信息。結合了LinuxDirectory ServerMIT KerberosNTPDNSDogtag(認證系統)。它由Web界面和命令行管理工具組成。相似於windows中的AD域linux

 環境準備

IP hostname 系統 用途
192.168.48.128 freeipa.bigdata-heboan.com CentOS7.4 服務端
192.168.48.129 client01.bigdata-heboan.com CentOS7.4 服務端

 

systemctl stop firewalld.service
systemctl disable firewalld.service

setenforce 0
vi /etc/selinux/conf
    設置SELINUX=disabled
關防火牆和selinux

 

安裝配置ipa-server (freeipa.bigdata-heboan.com )

①安裝ipa-serverweb

yum install ipa-server bind bind-dyndb-ldap ipa-server-dns

②配置ipa-serverwindows

[root@freeipa ~]# ipa-server-install --setup-dns
Server host name [server.test.co]:     ---回車鍵(默認)

Please confirm the domain name [test.co]:    ---回車鍵(默認)

Please provide a realm name [TEST.CO]:  ---回車鍵(默認)

Directory Manager password:   ---設置目錄管理的密碼 最少是8位

IPA admin password:  ---設置ipa 管理員admin的密碼 最少8位 必定要記住,後面要用到

Do you want to configure DNS forwarders? [yes]: no ---你想配置dns爲轉發器嗎? 選擇no

Do you want to search for missing reverse zones? [yes]: yes --你想配置dns的反向域嗎?選擇yes

Continue to configure the system with these values? [no]: yes --繼續配置系統其餘的值? 選擇yes

 驗證ipa-server瀏覽器

[root@freeipa ~]# kinit admin
Password for admin@BIGDATA-HEBOAN.COM: 
[root@freeipa ~]# ipa user-find --all

瀏覽器訪問https://freeipa.bigdata-heboan.com/ipa/ui緩存

 

部署客戶端(client01.bigdata-hebona.com)

①修改客戶端的DNS(網卡的配置),而後重啓網絡安全

DNS1=192.168.48.128   #指向freeipa server
DNS2=114.114.114.114

②安裝ipa-client服務器

yum install -y ipa-client

②配置 client加入域網絡

[root@client01 ~]# ipa-client-install --domain=bigdata-heboan.com --no-ntp --realm=BIGDATA-HEBOAN.COM –-mkhomedir
而後根據提示輸入對應設置

Continue to configure the system with these values? [no]: yes ---繼續配置系統其餘的值? 選擇yes
User authorized to enroll computers: admin ---域管理員
Password for admin@BIGDATA-HEBOAN.COM: ---密碼

在web ui上能夠看到客戶端已經加進來了dom

 基本使用

①添加一個用戶ssh

②策略---HBAC規則,刪除默認規則

添加一條規則

如今在任意一臺主機上使用heboan帳號遠程 client01.bigdata-heboan.com

ssh能夠正常登陸了,試試sudo, 竟然提示說不容許

目前用戶heboan只是一個普通用戶的權限,並不能使用sudo命令,若是想使用sudo提權,仍是須要配置sudo規則

 

注意,配置sudo規則後,並不會實時生效,默認會讀取緩存,該緩存每15分鐘增量更新一次,若是想實時生效,能夠修改客戶端/etc/sssd/sssd.conf

//增長如下兩行
ladb_sudo_full_refresh_interval = 3600
ladp_sudo_smart_refresh_interval = 30

//重啓sssd服務
systemctl restart sssd

再次嘗試執行 sudo

相關文章
相關標籤/搜索