CN107040424A - 一种自动化配置ldap服务器的方法 - Google Patents
一种自动化配置ldap服务器的方法 Download PDFInfo
- Publication number
- CN107040424A CN107040424A CN201710381984.6A CN201710381984A CN107040424A CN 107040424 A CN107040424 A CN 107040424A CN 201710381984 A CN201710381984 A CN 201710381984A CN 107040424 A CN107040424 A CN 107040424A
- Authority
- CN
- China
- Prior art keywords
- linux system
- ldap server
- ldap
- automatic configuration
- configuration
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 16
- 238000013515 script Methods 0.000 abstract description 4
- 238000010276 construction Methods 0.000 abstract description 2
- 230000008569 process Effects 0.000 description 10
- 238000009434 installation Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0876—Aspects of the degree of configuration automation
- H04L41/0886—Fully automatic configuration
Landscapes
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Stored Programmes (AREA)
Abstract
本发明公开了一种自动化配置LDAP服务器的方法通过Python自动化配置脚本,实现了LDAP服务器一键式搭建。大大提高了LDAP服务器的搭建效率,同时可以实现LDAP服务器批量搭建。本发明构建出了基于Python实现Linux系统下服务的自动化配置的系统框架,为后续Linux系统下服务的配置自动化提供了可能。
Description
技术领域
本发明涉及服务器安装配置领域。
背景技术
企业内部需要认证的服务越来越多,需要记住的密码也越来越多,如果这些服务进行相同的密码设置,会存在很大的安全隐患。LADP作为一种轻量级目录访问协议,在统一身份认证过程中大大简化的管理过程得到了绝大多数认证机制的支持。在整个LADP服务环节中LDAP服务器便是LDAP服务使用过程中重要的环节,然而由于LDAP服务器搭建步骤复杂,耗时耗力,本发明通过Python脚本实现了LDAP服务器的自动化搭建,大大简化了人工配置过程耗时耗力同时避免了人工配置过程中的失误。
发明内容
本发明为解决上述技术问题,为此,本发明提供一种自动化配置LDAP服务器的方法,它具有实现LDAP服务器快速批量搭建、实现Linux系统下服务的自动化配置的优点。
为了实现上述目的,本发明采用如下技术方案。
一种自动化配置LDAP服务器的方法,包含以下步骤:
创建lib库,实现对Linux系统的登录、指令发送、指令的执行等待后继续发送指令、登出功能;
调用Lib库中的指令,对LDAP服务器配置。
优选的,调用Lib库中的指令,包含,登录linux系统、向linux系统发送配置指令、用户添加、登出linux系统。
本发明的有益效果:本发明通过Python自动化配置脚本,实现了LDAP服务器一键式搭建。大大提高了LDAP服务器的搭建效率,同时可以实现LDAP服务器批量搭建。本发明构建出了基于Python实现Linux系统下服务的自动化配置的系统框架,为后续Linux系统下服务的配置自动化提供了可能。
附图说明
图1是本实施例LDAP服务器自动化配置过程图。
图2是Python自动化配置lib库调用过程示意图。
具体实施方式
下面结合附图与实施例对本发明作进一步说明。
图1是LDAP服务器的配置过程。首先挂载安装光盘并且配置本地yum源方便本地服务的安装。然后通过yum指令安装LDAP的相关服务,并且配置LDAP的相关配置文件。配置完成后重启slapd服务。创建100个LDAP共享用户,使用migrationtools格式转换工具转换用户格式后把用户添加到LDAP服务器中,最后重启slapd服务并刷新防火墙完成配置。
图2是python脚本自动化配置过程中对lib库中类的调用过程。开始执行Autoset后,首先使用Useradd实例创建100个ldapuser。Useradd首先调用ssh2_login登录linux系统,然后通过ssh2_cmd向linux系统下发送配置指令,通过for虚幻实现100个用户的添加操作。添加完成后调用ssh2_logout登出linux系统。然后使用CrtLADP开始配置LDAP服务器,CreLDAP首先调用ssh2_login登录linux系统,然后通过ssh2_cmd和ssh2_cmd_with_interaciton向linux系统下发送配置指令,通过配合linux系统下echo和sed等指令的使用完成LDAP服务器的配置。完成配置后调用ssh2_logout登出linux系统。
(1) Useradd函数
该函数的主要作用是在linux系统下创建用户。通过调用lib库中类实现用户的创建。
(2) CrtLDAP函数
该函数的主要作用是在linux系统下配置LDAP服务器。通过调用lib库中类实现LDAP服务器的配置。
(3) ssh2_login函数
该函数的主要作用是通过ssh服务登录指定的linux系统。根据远程调用的请求进行本调用返回执行结果。
(4) ssh2_sendcmd函数
该函数的主要作用是通过ssh服务登录指定的linux系统。根据远程调用的请求进行本调用返回执行结果。
(5) ssh2_sendcmd_with_interaction函数
该函数的主要作用是通过ssh服务登录指定的linux系统。根据远程调用的请求进行本调用返回执行结果。
(6) ssh2_logout函数
该函数的主要作用是通过ssh服务登出指定的linux系统。根据远程调用的请求进行本调用返回执行结果。
上述虽然结合附图对本发明的具体实施方式进行了描述,但并非对本发明保护范围的限制,所属领域技术人员应该明白,在本发明的技术方案的基础上,本领域技术人员不需要付出创造性劳动即可做出的各种修改或变形仍在本发明的保护范围以内。
Claims (2)
1.一种自动化配置LDAP服务器的方法,其特征在于,包含以下步骤:
创建lib库,实现对Linux系统的登录、指令发送、指令的执行等待后继续发送指令、登出功能;
调用Lib库中的指令,对LDAP服务器配置。
2.如权利要求1所述的调用Lib库中的指令,其特征在于,包含登录linux系统、向linux系统发送配置指令、用户添加、登出linux系统的指令。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710381984.6A CN107040424A (zh) | 2017-05-26 | 2017-05-26 | 一种自动化配置ldap服务器的方法 |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710381984.6A CN107040424A (zh) | 2017-05-26 | 2017-05-26 | 一种自动化配置ldap服务器的方法 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN107040424A true CN107040424A (zh) | 2017-08-11 |
Family
ID=59540426
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710381984.6A Pending CN107040424A (zh) | 2017-05-26 | 2017-05-26 | 一种自动化配置ldap服务器的方法 |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN107040424A (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109981743A (zh) * | 2019-02-27 | 2019-07-05 | 苏州浪潮智能科技有限公司 | 一种icos5.5-ldap与as-13000存储多节点融合部署方法 |
Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO1999033211A1 (en) * | 1997-12-23 | 1999-07-01 | Mediaone Group, Inc. | Method and system for automatic allocation of resources in a network |
| EP1289243A1 (en) * | 2001-08-31 | 2003-03-05 | Openwave Systems Inc. | System and method for implementing an Interactive Voice Response (IVR) system based on the LDAP protocol |
| US20080104215A1 (en) * | 2006-10-25 | 2008-05-01 | Sun Microsystems, Inc. | Method and system for managing server configuration data |
| CN102064953A (zh) * | 2009-11-12 | 2011-05-18 | 中兴通讯股份有限公司 | ldap服务器的用户权限信息配置系统、装置和方法 |
| CN102306147A (zh) * | 2011-03-18 | 2012-01-04 | 北京神州数码思特奇信息技术股份有限公司 | 一种java语言对ldap的访问操作的方法及系统 |
| CN102510413A (zh) * | 2012-01-04 | 2012-06-20 | 北京邮电大学 | 一种基于ldap的配置管理方法和系统 |
| US20140289722A1 (en) * | 2013-03-22 | 2014-09-25 | International Business Machines Corporation | Parallel program installation and configuration |
| CN105450606A (zh) * | 2014-08-27 | 2016-03-30 | 中国银联股份有限公司 | 一种ldap服务节点及同步方法 |
-
2017
- 2017-05-26 CN CN201710381984.6A patent/CN107040424A/zh active Pending
Patent Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO1999033211A1 (en) * | 1997-12-23 | 1999-07-01 | Mediaone Group, Inc. | Method and system for automatic allocation of resources in a network |
| EP1289243A1 (en) * | 2001-08-31 | 2003-03-05 | Openwave Systems Inc. | System and method for implementing an Interactive Voice Response (IVR) system based on the LDAP protocol |
| US20080104215A1 (en) * | 2006-10-25 | 2008-05-01 | Sun Microsystems, Inc. | Method and system for managing server configuration data |
| CN102064953A (zh) * | 2009-11-12 | 2011-05-18 | 中兴通讯股份有限公司 | ldap服务器的用户权限信息配置系统、装置和方法 |
| CN102306147A (zh) * | 2011-03-18 | 2012-01-04 | 北京神州数码思特奇信息技术股份有限公司 | 一种java语言对ldap的访问操作的方法及系统 |
| CN102510413A (zh) * | 2012-01-04 | 2012-06-20 | 北京邮电大学 | 一种基于ldap的配置管理方法和系统 |
| US20140289722A1 (en) * | 2013-03-22 | 2014-09-25 | International Business Machines Corporation | Parallel program installation and configuration |
| CN105450606A (zh) * | 2014-08-27 | 2016-03-30 | 中国银联股份有限公司 | 一种ldap服务节点及同步方法 |
Non-Patent Citations (1)
| Title |
|---|
| LO散落: "LDAP学习及服务器的搭建", 《HTTPS://BLOG.CSDN.NET/QQ_15117745/ARTICLE/DETAILS/45749359》 * |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109981743A (zh) * | 2019-02-27 | 2019-07-05 | 苏州浪潮智能科技有限公司 | 一种icos5.5-ldap与as-13000存储多节点融合部署方法 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107493344B (zh) | 一种Web访问Docker容器的方法及系统 | |
| CN110463163B (zh) | 用于提供对会话服务器的按需唤醒访问的方法及系统 | |
| CN102427481A (zh) | 用于对云计算服务进行管理的系统及云计算管理方法 | |
| CN105306225B (zh) | 一种基于Openstack的物理机远程关机方法 | |
| CN110968476B (zh) | 一种自动监控Linux系统登录信息的方法及装置 | |
| CN105872019A (zh) | 一种Web端登录Docker容器的方法和装置 | |
| CN103312744A (zh) | 一种基于云桌面的业务办理方法、平台及系统 | |
| US11782748B2 (en) | Cloud shell extension framework | |
| CN107911467B (zh) | 一种脚本化操作的服务操作管理系统和方法 | |
| CN116389194B (zh) | 基于云计算平台的vpn服务生成方法、系统、设备及介质 | |
| WO2023231681A1 (zh) | 账号创建方法、物联网多租户系统、设备、程序和介质 | |
| EP4018629B1 (en) | Desktop virtualization with a dedicated cellular network connection for client devices | |
| CN109033803A (zh) | 一种基于门户app的移动微应用登录管理方法 | |
| CN105323291A (zh) | 移动应用统一登录处理方法及装置 | |
| CN107040424A (zh) | 一种自动化配置ldap服务器的方法 | |
| US9800620B2 (en) | Softphone over Desktop-as-a-Service (DaaS) | |
| CN103220170A (zh) | 一种自动化配置和管理设备的方法和装置 | |
| CN107172183A (zh) | 一种统一管理用户的方法、装置及系统 | |
| CN117311804A (zh) | 应用迁移方法、装置、电子设备和计算机可读介质 | |
| CN116627595A (zh) | 一种虚拟机创建方法及相关组件 | |
| US9178761B2 (en) | Provisioning VPN phones | |
| KR102192321B1 (ko) | 클라우드 컴퓨터 구동 방법 및 장치 | |
| CN112235372A (zh) | 基于云桌面的云端挂载私有网盘的系统及其挂载方法 | |
| CN107463438B (zh) | 用于多Openstack环境的信息处理方法、装置和系统 | |
| WO2015180298A1 (zh) | 业务鉴权的处理方法及装置 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170811 |