服务器端:
1.以只读的方式共享目录/public同时只能被domain11.example.com域中的系统
2.以读写的方式共享目录/protected需要通过Kerberos安全加密,您可以使用下面URL提供的密钥http://host.domain11.example.com/materials/nfs_server.keytab
3.目录/protected应该包含名为project.拥有人为deepak的子目录
4.用户deepak能以读写方式访问/protected/project
在system2上挂载一个system1.domain11.example.com的NFS共享,并符合下列要求:
1、/public挂载在下面的目录上/mnt/nfsmount
2、/protected挂载在下面的目录上/mnt/nfssecure并使用安全的方式,密钥下载URL如下:/materials/nfs_client.keytab
3、用户deepak能够在/mnt/nfssecure/project上创建文件
4、这些文件系统在系统启动时自动挂线
yum install authconfig-gtk sssd
authconfig-gtk (server只要ldap)
dc=example,dc=com
ldap://classroom.example.com
EXAMPLE.COM
classroom.example.com
http;//classroom.example.com/pub/keytabs/server5.keytab
yum install nfs-utils -y
vim /etc/exports
/public 172.25.5.0/24(ro,sync)
/protected 172.25.5.0/24(rw,sync,sec=krb5p)
wget -O /etc/krb5.keytab http://
mkdir /public
mkdir -p /protected/project
chmod o+w /protected
chcon -R -t public_content_t /protected/project
chown ldapuserX /protected/project
systemctl start nfs-server && systemctl enable nfs-server
systemctl start nfs-secure-server && systemctl enable nfs-secure-server
firewall-cmd --permanent --add-service=nfs --zone=work
#firewall-cmd --add-service=rpc-bind –permanent --zone=work
#firewall-cmd --add-service=mountd -–permanent --zone=work
firewall-cmd --reload
客户端:
yum install authconfig-gtk sssd
yum install nfs-utils -y
wget -O /etc/krb5.keytab http://
vim /etc/fstab
server5:/public /mnt/public nfs defaults 0 0
server5:/protected /mnt/protected nfs rw,sync,sec=krb5p 0 0
mkdir /mnt/public /mnt/protected
systemctl start nfs-secure && systemctl enable nfs-secure
mount -a