版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
用户信息及文件集化管Mark&:本文遵循“署名-非商业性使用-相同方式共享2.5陆”协 第1章用户集中化管理的益 第2章LDAP(LightweightDirectoryAccess 第3章NFS(NetworkFile 第4章AutoFS(automount 第5.1节服务器基本配 第5.2节数据库配 第5.3节客户端配 第5.4节配置认证缓存 I 应用分布地理位置分散,十分 概念和类LDAP LDAP(LightweightDirectoryAccessLDAPLightweightDirectoryAccessProtocolX.500X.500LDAP支持TCP/IPInternet是必须的。LDAPLDAP中获取信息。LDAP中可以各种类型的数据:电子邮件地址、邮件路由信息、人力资源数据、公用密匙、联系人列表,等等。作为系统集成中的一个重要环节,可以简化员工在企业内部查询信息的步骤,甚至连主要的数据源都可以放在任何地方。服务,那LDAP无疑是一个不错的选择。加入对LDAP的支持,因为他们根本不用考虑另一端(客户端或服务端)是怎么样的。LDAP允许你根据需要使用ACI(一般都称为ACL或者控制列表)控制对数据读进行控制。这些都是由LDAP服务器完成,非常的安全。 不能用SQL语句了。在这个树型结构上的每个节点,我们称之为“条目(Entry)”, 做基准DN。比如本公司的是 ,则我的基准DN为"dc=example,"。在 销售部、财务部,等等。比如我要表示本公司销售部的经理级人员,我们可以这样表2LDAPLightweightDirectoryAccess ",为了可以区分每个条目,我们需我要表示本公司销售部的经理级人员flyer。那么我可以这样写"uid=flyer,ou=manager, 在 数据库中,所有的条目都必须定义objectClass这个属性。每个条括必有属性(requitedattribute)和可选属性(optionattribute)。一个条目的属性是由它所继承的所有ObjectClasses的属性集合决定的,此外可以包括LDAP中规定的“操作属性”(操作属性是一种独立于ObjectClass而存在的属性,它 也不是LDAP规定的操作属性,那么是不能直接绑定(在LDAP中,给Entry赋予属性的过程称为绑定)到条目上的,你必须自定义一个含有你需要的属性的ObjectClass,而后将此类型赋给条目。ObjectClass是可以被继承的,这使它看上去真的很像Java语言。继承类的对象实例也必须实现父类规定的必有属性(requitedattribute),同时拥有父类规定的可选属性(optionattribute)。继承类可以扩展父类的必有属性和可选属性。LDAP的另一个重要的组成部分就是Schema,Schema定义了LDAP 结构和规则,比如一个objectclass会有哪些属性,这些属性又是什等等。 NFS(NetworkFileNFSserverFILESERVERSERVER共享出来的 V3(rfc1813)(V4(rfc3010)。 AutoFS(automountAutoFS提供了一种按需自动挂接和空闲超时自动卸除文件系统的机制。挂接点可以使用本地的或分布式自动挂接地图。它是一个客户端的服务,当此服务驻留内存后,不论什么时候,当运行automound守护进程的客户机上的用户试图文件或 时,守护进程 所属的)文件系统。只要有需要,这些文件系统就可以一直保持被挂接状态。如果有定义时间周期,到时automound会自动卸载该文件对于不同的物理设备(硬盘、软盘、cdrom等等)和/或操作系统,装点对应一块区域或一个文件系统(例如,一个硬盘分区)。然后如果你想存取其它的分区,只rootmount命令(除非特定的选项“user”/etc/fstab中)。作为超级用户root,要指明安装位置,被安装的分区,有时还包括文件系统和其他一些选项。默认情况下Automount和AutoFS允许系统管理员配置机器能够的所有的文件系统,它同样要用到mount。用户可以用一种完全透明的方式来这些系统,完全不必关心内核是如何#service#serviceautofs{start|stop|status|restart|reload|Start:含义很明显,启动进程。启动时,autofs将在配置文件/etc/auto.master中查询查询NISmaps(关于这一点,这篇文章不作过多涉及)。Stop:autofsautomounts意,maps中的变化在重新启动后将被体现出来。另一方面,auto.masterCondrestart:AutoFS是否已运行,Restart,如果AutoFS没有运行,就什么也不做。/etc/auto.master是autofs的主要文件。每一行描述一个安装点,指向包含文件系统描 。同时auto.master也可以由NIS提供每一行的语法如下[-mount-maExample/home这里设置了3个安装点,/home,/misc和/mnt。为了/misc automount将会/etc/auto.misc文件,以便找到安装选项和与文件系统相关的关键字(thekey)。最后2行包含可选项。他们在mount的manpage中有描述,而且是标准的。就象例子中最后一行所显示的那样,autofsautomountmaps(NIS或其他)auto.homeauto.misc都是挂接配置文件。其文件语法是ma floppy-fstype=automsdiskmsdisk-fstype=vfat 。例如:如果你已经将/dev/sdb1挂接在了/home上,你就不能设置一台LDAPNFS 为你的ldap[root@test[root@test~]#yuminstallopenldap-servers s-生成DB_CONFIG文件,ldap[root@test[root@test~]#cp-p/usr/share/openldap-[root@testopenldap]##ll-ddrwx2ldapldap409632616:41创建ldap[root@test~]#slappasswdNew[root@test~]#slappasswdNewpassword:uplookingRe-enternewpassword:再次输入创建ldap服务器主配置文件,我们需要管理员与[root@test[root@test~]#cat>/etc/openldap/slapd.conf<< /etc/openldap/schema/p.schema allowbind_v2 ####Encrypting File/etc/pki/tls/certs/ca.crtTLSFileTLSKeyFile/etc/pki/tls/certs/slapd.key###DatabaseConfig###databasedatabaserootdnrootpwaccessto*bydn.exact=gidNumbermanageby*breakdatabase#allowonlyrootdntoreadthemonitoraccessto*byby*[root@testopenldap]#rm-rf[root@testopenldap]#slaptest-f/etc/openldap/slapd.conf-F/etc/openldap/slapd.d[root@testopenldap]#chown-Rldap:ldap/etc/openldap/slapd.d[root@testod-R000[root@testod-Ru+rwX1)生成ca私钥,一定要留[root@test[root@test~]#opensslgenrsa-des3-outca.key4096GeneratingRSAprivatekey,4096bitlongmodulus eis65537EnterpassphraseforVerifying-Enterpassphrasefor生成ca[root@test[root@test~]#opensslreq-new-x509-days365-keyca.key-outEnterpassphraseforYouareabouttobeaskedtoenterinformationthatwillbeintoWhatyouareabouttoenteriswhatiscalledaDistinguishedNameoraTherearequiteafewfieldsbutyoucanleavesomeblankForsomefieldstherewillbeadefaultvalue,Ifyouenter'.',thefieldwillbeleftCountryName(2lettercode)StateorProvinceName(fullname)[]:shanghaiLocalityName(eg,city)[DefaultOrganizationName)OrganizationalUnitName(eg,section)CommonCommonName(eg,yournameoryourserver'shostname)Address[root@test[root@test~]#opensslgenrsa-des3-outslapd.key4096GeneratingRSAprivatekey,4096bitlongmodulus eis65537EnterpassphraseforVerifying-Enterpassphrasefor[root@test[root@test~]#opensslrsa-inslapd.key-outslapd.keyEnterpassphraseforslapd.key:writingRSA[root@test[root@test~]#opensslreq-new-keyslapd.key-outYouareabouttobeaskedtoenterinformationthatwillbeintoWhatyouareabouttoenteriswhatiscalledaDistinguishedNameoraTherearequiteafewfieldsbutyoucanleavesomeForForsomefieldstherewillbeadefaultIfyouenter'.',thefieldwillbeleftCountryName(2lettercode)StateorProvinceName(fullname)[]:shanghaiLocalityName(eg,city)[DefaultOrganizationName)OrganizationalUnitName(eg,section)CommonName(eg,yournameoryourserver'shostname)[]:Address[]:root@Pleaseenterthefollowing'extra'tobesentwithAchallengepasswordAnname注意一下,CommonName要和你的主机名一致。用CA签名并产生公钥[root@test[root@test~]#opensslx509-req-days365-inslapd.csr-CAca.crt-CAkeyca.key-01-outSignature/GettingCAPrivateEnterEnterpassphrasefor 使用密[root@test~]#cpca.crt/etc/pki/tls/certs/ca.crt[root@test~]#cpca.crt/etc/pki/tls/certs/ca.crt[root@test~]#cpslapd.crt catcat>bdb.ldif<<dn: objectClass:olcDatabaseConfigobjectClass:olcBdbConfigolcDatabase:{1}bdbolcDbDirectory:/var/lib/ldapolcRootPW:redhattime.hard=unlimitedsize.soft=unlimitedsize.hard=unlimitedolcDbIndex:uidolcDbIndex:olcDbIndex:cn,sn,dis olcDbIndex:uidNumber,gidNumbereqolcDbIndex:memberUideqolcDbIndex:objectClasseqolcDbIndex:entryCSNolcAccess:toattrs=userPasswordbyselfwritebyanonymousauthbydn.children="ou=admins,dc=example,dc=org"writeby*noneolcAccess:to*byselfwritebydn.children="ou=admins,dc=example,dc=org"writeby*rmrm-rfchownldap.ldapchownldap./var/lib/ldap/DB_CONFIGserviceslapdldapsearchldapsearch-x-b"cn=config"-D-v=config"-wconfig-hlocalhostdn-LLL|ldapaddldapadd-x-D=config"-wconfig-fbdb.ldif-hldapsearch-x-b"cn=config"-D-v=config"-wconfig-hlocalhostdn-LLL|catcat>data1.ldif<<ENDFdn:dc=example,dc=orgobjectClass:topobjectClass:dcObjectobjectclass:organizationo:ExampleOrganizationdc:Exampledescription:LDAPobjectClass:organizationalUnitou:objectClass:organizationalUnitou:dn:ou=Admins,dc=example,dc=orgobjectClass:organizationalUnitou:uid:student1cn:student1sn:1objectClass:topobjectClass:posixAccountobjectClass:inetOrgloginS:/bin/bashhomeDirectory:/ldaphome/student1mail:student1@gecos:Student1uid:student2cn:sn:2objectClass:topobjectClass:objectClass:inetOrgloginS:homeDirectory:/ldaphome/student2mail:student2@gecos:Student2objectClass:posixGroupobjectClass:topcn:ldapusersuserPassword:{crypt}xmemberuid:uid=student1memberuid:ldapaddldapadd-x-D"cn=Manager,dc=example,dc=org"-wredhat-hlocalhost-f [root@test~]#cat>~/ldif/autofs.ldif<<ENDF[root@test~]#cat>~/ldif/autof
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- KRAS-IN-48-生命科学试剂-MCE
- 2026年小学舞蹈测试题及答案
- 2026年脑力在线测试题及答案
- 2026年管材管件测试题及答案
- 2026年厅堂服务测试题及答案
- 2026年高中原电池测试题及答案
- 2026年素描初级测试题及答案
- 2026年苏教版繁星测试题及答案
- 2026年硕士英语测试题及答案
- (2026版)医疗核心制度考试题及答案
- 2026年湖北天门市专业技术职务水平能力测试(党建基础知识)练习试题及答案
- 2026年高考北京卷文综历史预测考点题库真题及答案
- 2026江苏苏州工业园区综合执法系统招聘工作人员20人考试参考试题及答案解析
- 统编版历史八年级下册第20课《维护国家安全和推进祖国统一》 教学课件
- 2026年招标采购从业人员《招标采购专业理论与法律基础(初级)》考试真题(含解析)
- 2026年国际注册汉语教师资格等级考试基础综合教材笔记及真题题库
- 2026四川省引大济岷水资源开发有限公司第二批次招聘68人笔试参考题库及答案解析
- 2026广东中山大学附属第三医院招聘事业单位人员29人(第二批)笔试备考题库及答案解析
- 2025年大数据管理中心招聘考试笔试试题(含答案)
- 党员发展对象培训考试题库完整版附答案【完整版】
- 芜湖城建集团笔试试卷真题
评论
0/150
提交评论