User Tools

Site Tools


tech:ldap:start

This is an old revision of the document!


LDAP Topics

Installation & Configuration

LDAP PHP Module

  • yum install php-ldap
  • vim /etc/php.ini … add: extension=ldap.so
  • service httpd restart

Active Directory server discovery

In a command terminal: (where the domain name is MS)

nslookup
set type=all
_ldap._tcp.dc._msdcs.MS

Notes

# Show all entries, as root ...
ldapsearch -h cosmos -D dc=root,dc=samudio,dc=net -w rootpassword -b dc=samudio,dc=net "(objectClass=inetOrgPerson)"

# Show all entries as authenticated user:
ldapsearch -h cosmos -D "uid=msamud1,ou=person,dc=samudio,dc=net" -w yourpassword -b dc=samudio,dc=net

# Show one searched-for entry:
ldapsearch -h cosmos -D "uid=msamud1,ou=person,dc=samudio,dc=net" -w yourpassword -b dc=samudio,dc=net "(&(objectClass=inetOrgPerson)(sn=Samudio))"

# To add an entry, something like:
ldapadd -x -D "dc=root,dc=samudio,dc=net" -w rootpassword -f optum.ldif

# Sample add.ldif content ...
dn: uid=mattbot,ou=person,dc=samudio,dc=net
objectclass: inetOrgPerson
cn: Matt Bot
sn: Bot
uid: mattbot
ou: InfoTech
mail: mattbot@albertleadata.com
mail: mattbot@albertleadata.org

# To change an entry, something like:
ldapmodify -x -D "dc=root,dc=samudio,dc=net" -w rootpassword -f chg.ldif

# Sample chg.ldif content ...
dn: uid=mattbot,ou=person,dc=samudio,dc=net
changetype: modify
add: ou
ou: bluejayuser

# Changing/adding a password for user, using root ...
ldappasswd -xv -D dc=root,dc=samudio,dc=net -w rootpassword -S "uid=msamud1,ou=person,dc=samudio,dc=net"
tech/ldap/start.1527534519.txt.gz · Last modified: 2018/05/28 14:08 by rk4n3