Linux_LDAP+NFS+autofs
目录
前言
LDAP+NFS+Autofs也是一种网络用户集中管理解决方案,相对于NIS+NFS+Autofs而言,有着更可靠的安全性。
Ldap
LDAP(Lightweight Directory Access Protocol)轻量目录访问协议,它基于X.500标准的,与X.500不同,LDAP支持TCP/IP,这对访问Internet是必须的。LDAP的核心规范在RFC中都有定义,所有与LDAP相关的RFC都可以在LDAPman RFC网页中找到。
LDAP+NFS+autofs
ServerPost
step1.
yum install -y openldap openldap-clients openldap-servers
step2.Change the dynamic ldap config file.
mv slapd.d slapd.d.bak --> /etc/openldap
step3. Use the static ldap config file.
cp /usr/share/openldap-servers/slapd.conf.obsolete /etc/openldap/slapd.conf
step4. Edit the LDAP config file in the section “database definitions” as below:
vim /etc/openldap/slapd.conf
# database definitions
################################################################
database bdb
suffix "dc=nice,dc=com"
checkpoint 1024 15
rootdn "cn=Manager,dc=nice,dc=com"
rootpw fanguiju
#################################################################
#the meaning is assign the domain for storage the user account.
# cn=Manager-->ManagerAccount
# dc=nice,dc=com-->storage user account domain
step5. Edit the ldap domain database config file.
cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB__CONFIG
chown ldap:ldap DB_CONFIG
step6. Start ldap service
service ldap start
ldapsearch -x -b "dc=nice,dc=com"
-x #简单明文方式发送
step6. Converting local user infomation into LDAP user infomation also storage the LDAP user infomation to the database file.
yum install -y migrationtools --> migrationtools is a format conversion.
vim /usr/share/migrationtools/migrate_common.ph
$DEFAULT_MAIL.DOMAIN="nice.com"
$DEFAULT_BASE="dc=nice,dc=com"
Create base.ldif
./migrate_base.pl > base.ldif #Converting the base info into LDAP info
#Edit the base.ldif file as below(keep base item of nice,People,Group):
dn: dc=nice,dc=com
dc: nice
objectClass: top
objectClass: domain
dn: ou=People,dc=nice,dc=com
ou: People
objectClass: top
objectClass: organizationalUnit
dn: ou=Group,dc=nice,dc=com
ou: Group
objectClass: top
objectClass: organizationalUnit
Create user.ldif
./migrate_passwd.pl /etc/passwd > user.ldif #Converting the user info into LDAP info, if you want to keep therein some user ,you can cut the user info in the passwd file also storage it to new file.将要加入到LDAP的用户留下
Create group.ldif
./migrate_group.pl /etc/group > group.ldif #Converting the group info into LDAP info, idem.
step7. After converting,import the LDAP info to the DB file.
ldapadd -D "cn=Manager,dc=nice,dc=com" -W -x -f base.ldif #input password of "jmilkfan".
ldapadd -D "cn=Manager,dc=nice,dc=com" -W -x -f user.ldif
ldapadd -D "cn=Manager,dc=nice,dc=com" -W -x -f group.ldif
step8. Test the LDAP config again.
ldapsearch -x -b "dc=nice,dc=com"
step9. Setup the PHP env (phpldapadmin)
yum install -y php php-ldap
tar phpldapadmin -C /var/www/html #Source code install phpldapadmin
cp /var/www/html/phpldapadmin/config/config.php.example /var/www/html/phpldapadmin/config/config.php
step10. Login phpldapadmin via web protal.
http://localhost/phpldapadmin
step11. Create TLS(Transport Layer Security 安全传输协议) and check authentication certificate.
sh certcreate.sh #create certificate by certcreate.sh script
step12. Write TLS authentication certificate URL to the slap.conf.
vim /etc/openldap/slapd.conf
cp XXX.crt XXX.key /etc/openldap/certs
cp XXX.crt /var/www/html --> client can download the cert file
step13. Test the LDAP in clientPort.
Add LDAP domain by imaging and login the LDAP user.
step14. Setup the NFS
vim /etc/exports
/home 192.168.0.0/24(rw,sync)
Restart service
service nfs restart
step15. Setup the autofs
vim /etc/auto.master
/home /etc/auto.ldap
cp /etc/auto.misc /etc/auto.ldap
vim /etc/auto.ldap
* -fstype==nfs,rw LDAPServerIP:/home/&
Restart service
start autofs restart
step16. Test the LNA
su - LdapUserName
Linux_LDAP+NFS+autofs的更多相关文章
- Linux_NIS+NFS+Autofs
目录 目录 前言 NIS NFS Autofs 搭建NISNFSAutofs Setup NNA environment Setup ServerSite Setup client 前言 NIS+NF ...
- Nis+Nfs+Autofs
Nis: NIS服务的应用结构中分为NIS服务器和NIS客户机两种角色 NIS服务器集中维护用户的帐号信息(数据库)供NIS客户机进行查询 用户登录任何一台NIS客户机都会从NIS服务器进行登录认证, ...
- Linux nfs+autofs 环境搭建
两台服务器环境为centos 6.6 1.安装配置nfs 安装portmap 和 nfs [root@node0 ~]# yum install portmap [root@node0 ~]# yu ...
- 文件共享NFS&&autofs
文件传输工具 NFS服务 ftp vsftpd Samba linux和Windows之间进行文件共享 专用于linux和linux之间的专门的文件共享服务 (NFS服务),network,files ...
- 网络共享存储服务NFS
网络共享存储服务NFS 作者:Eric 微信:loveoracle11g 环境准备 服务器系统 角色 IP RHEL 7.5 x86-64 NFS服务端 192.168.10.201 RHEL 7.5 ...
- Linux基础学习-NFS网络文件系统实时文件共享
NFS网络文件系统 如果大家觉得Samba服务程序的配置太麻烦了,那么你共享文件的主机都是Linux系统,那么推荐大家在客户端部署nfs服务来共享文件.nfs(网络文件系统)服务可以将远程Linux系 ...
- RHCE实验记录总结-2-RHCE
RHCSA实验总结-点击跳转 RHCE实验 RHCE这边我简单分了下类: ## 网络与安全 1. IPv6 设置(推荐使用GUI程序 nm-connection-editor来完成) 2. team ...
- RHCE实验记录总结-1-RHCSA
不管是运维还是开发系统的了解下Linux或者系统的温习整理一下Linux知识点无疑是较好的,这篇文章是对RHCSA&RHCE实验进行一个汇总,是我为了做实验方便(并分享给朋友)的一篇文章. 前 ...
- 红帽RHCE培训-课程2笔记目录
目录 1 kickstart自动安装 DHCP+TFTP(syslinux) +FTP +KICKSTART ~/anaconda-ks.cfg system-config-kickstart 2 g ...
随机推荐
- 分布式系统中唯一 ID 的生成方法
在分布式系统存在多个 Shard 的场景中, 同时在各个 Shard 插入数据时, 怎么给这些数据生成全局的 unique ID? 在单机系统中 (例如一个 MySQL 实例), unique ID ...
- 计算机系统结构总结_Cache Optimization
Textbook: <计算机组成与设计——硬件/软件接口> HI <计算机体系结构——量化研究方法> QR Ch4. Cache Optimization 本章要 ...
- IO同步阻塞与同步非阻塞
BIO.NIO.AIO IO(BIO)和NIO区别:其本质就是阻塞和非阻塞的区别 阻塞概念:应用程序在获取网络数据的时候,如果网络传输数据很慢,就会一直等待,直到传输完毕为止. 非阻塞概念:应用程序直 ...
- java并发学习--第八章 JDK 8 中线程优化的新特性
一.新增原子类LongAdder LongAdder是JDK8中AtomicLong的增强工具类,它与AtomicLong最大的不同就是:在多线程场景下,LongAdder中对单一的变量进行拆分成多个 ...
- vuex使用方法
vuex是一个专门为vue.js设计的集中式状态管理架构.状态?我把它理解为在data中的属性需要共享给其他vue组件使用的部分,就叫做状态.简单的说就是data中需要共用的属性.比如:我们有几个页面 ...
- BSOJ5467 [CSPX2017#3]整数 莫比乌斯反演+杜教筛
题意简述 给你两个整数\(n\),\(k\),让你求出这个式子 \[ \sum_{a_1=1}^n \sum_{a_2=a_1}^n \sum_{a_3=a_2}^n \cdots \sum_{a_k ...
- MySQL--全文索引作用、原理及使用注意
作用 MySQL索引可以分为:主键索引.普通索引.唯一索引.全文索引.其中,全文索引应该是是比较特殊的,它只有少数的几个存储引擎支持,且只有类型为char.vchar.text的列能建立全文索引.以前 ...
- 【NOIP2016提高组A组7.16】大鱼海棠
题目 椿是掌管海棠花的少女,她所在的世界不为人们所知,他们的天空就是人类的海底.生活在那个世界里的他们不是人,也不是鱼,而是其他人,掌管着人间的规律. 按照他们的习俗,在16岁那年,椿变为一条海豚到人 ...
- 大数减法(A - B Problem Plus)问题
解题思路 flagA为0表示A为正整数,为-1表示A为负整数: flagB为0表示B为正整数,为2表示B为负整数: 而 flag = flagA + flagB. 1.当 flag == 0 表示数A ...
- linux运维、架构之路-MySQL日志(三)
一.MySQL日志 1.错误日志 ①配置方法 [mysqld] log-error=/data/mysql/mysql.log ②查看配置方式 mysql> show variables lik ...