ldap基本命令

前端数据如下:

### frontend.ldif ###
dn: dc=ldap,dc=example,dc=com
objectclass: top
objectclass: dcObject
objectclass: organization
dc: ldap
o: ec

dn: ou=people,dc=ldap,dc=example,dc=com
objectclass: top
objectclass: organizationalUnit
ou: people

dn: uid=user01,ou=people,dc=ldap,dc=example,dc=com
objectClass: top
objectclass: uidObject
objectclass: person
uid: user01
cn: harry
sn: potter
userpassword:123

dn: uid=user02,ou=people,dc=ldap,dc=example,dc=com
objectClass: top
objectclass: uidObject
objectclass: person
uid: user02
cn: lucy
sn: marry
userpassword:123

  添加到后端的命令:

ldapadd -x -D cn=admin,dc=ldap,dc=example,dc=com -W -f frontend.ericsson.ldif

  或者:

ldapadd -x -D cn=admin,dc=ldap,dc=example,dc=com -w secret -f frontend.ericsson.ldif

  查询命令:

ldapsearch -x -h ip -p 389 -b "dc=ldap,dc=example,dc=com" -s sub "(objectClass=*)"

  

时间: 2024-07-29 22:24:05

ldap基本命令的相关文章

linux基本命令整理(三):进程和vim

linux基本命令整理(三) -----------进程和vim 一.进程 1.查看进程 ps:将某个时间点的程序运行的状况截取下来 a:所有的进程 x:后台进程 u:有效的使用者相关的进程(常用组合aux) -IA:也能观察系统所有的数据 axjf:连同部分的程序树状态 -I:今查看和自己bash相关的程序 top:动态的观察进程的变化 -d:后面接描述,就是整个页面刷新的时间:默认是5秒 -b:以批次的方式执行top -n:与-b搭配使用,意义是需要进行几次top的输出结果 如:top -b

Linux 基本命令运行

Linux 基本命令运行 开启Linux操作系统,要求以root用户 登录GNOME图形界面,语言支持选择 为汉语 使用快捷键切换到虚拟终端2,使用普通 用户身份登录,查看系统提示符 使用命令退出虚拟终端2上登录的用户 使用快捷键切换到虚拟终端5,使用管理员身份登录,查看系统提示符 使用命令退出虚拟终端5上登录的用户 切回图形界面,右单击桌面打开终端,输入关闭系统的命令 查看哪些用户在系统上工作 修改当前时间为2018年8月26号11:28 查看2015年10月份日历 使用两种方法查看ls命令的

ldap配置

1.ldap是什么 ldap目录服务认证,和windows活动目录类似,就是记录数据的一种方式 2.ldap客户端所须软件 yum sssd krb5-workstation -y 3.如何开启ldap用户认证 authconfig-tui 安装时因为tls的证书缺失,需要到服务器端下载所需要的证书到/etc/openldap/cacerts, 用到的命令 wget http://172.25.254.254/pub/example-ca.crt    应直接在/etc/openldap/cac

c#取出LDAP SearchResult所有属性

string aaa = System.Threading.Thread.CurrentPrincipal.Identity.Name; DirectorySearcher ds = new DirectorySearcher();            ds.SearchRoot = new DirectoryEntry("LDAP://888.888.0.11/CN=Users,DC=***,DC=com", "***", "***");  

LDAP

一.简介 目录服务由目录数据库和一套协议组成,是一个存储.组织和提供信息访问服务的软件系统. LDAP是轻量目录访问协议,英文全称是Lightweight Directory Access Protocol,一般都简称为LDAP,它基于X.500标准的,可以根据需要定制.   二.资源 1)ldap_libraries_for_c ftp://sdk.provo.novell.com/ndk/cldap/builds/   三.实例 http://blog.csdn.net/seraphsky/

LINUX基本命令行手册一

linux基本命令行手册一    1.1基本的网络命令        1>wget 从服务器上检索或下载文件,支持HTTP,HTTPS,FTP协议,服务器响应后,会将请求到的文件下载到当前用户所处的目录下        语法:wget [option]... [URL]...        option:            -t:尝试请求服务器的次数,若在指定的次数内,未响应,则断开链接            -o:将信息输出保存在记录文件中            -nc:支持断点下载,当下

ldap for ruby

Net::LDAP for Ruby (also called net-ldap) implements client access for the Lightweight Directory Access Protocol (LDAP), an IETF standard protocol for accessing distributed directory services. Net::LDAP is written completely in Ruby with no external

集中用户认证ldap

一.实验环境如下: rhel1:192.168.10.1   ldap-server rhel2:192.168.10.2   ldap-client 二.实验结果: 1. rhel1上的两个用户client1与client2可以在rhel2上登录系统: 2. client1与client2在rhel2上登录后都有自己的加目录: 三.实验具体实施步骤: (1.)rhel1(ldap服务端)配置过程: 1.安装ldap服务端软件包:yum  install  openldap-servers  -

《ldap认证---7.0RHEL》

使用LDAP验证服务 1. 安装相关的软件 yum install  -y  authconfig-gtk yum install  -y  krb5-workstation yum install  -y   sssd 2. 使用图形化界面配置: # authconfig-gtk 点击Download... 输入: http://classroom.example.com/pub/example-ca.crt 点击Apply 验证方法: 注:如果出现这个用户,则证明启用LDAP客户端成功