How to display time in the bash promt ?
# declare -x PS1=" \@ Bash $ "
05:05 PM Bash $
#!/bin/bash
case "$1" in # Searching LDAP name from full name ln) LN= # Group search gs) GID=`ldapsearch -x -b "dc=test,dc=com" "(cn=$2)" | sed -n -e '/^gid/p' | cut -d: -f2`; if [ "$GID" = "" ]; then echo " The "$2" LDAP group does not exist" else echo "GID OF the $2 group is $GID" MEM=`ldapsearch -x -b "dc=test,dc=com" "(cn=$2)" | sed -n -e '/^member/p' | cut -d: -f2`; if [ "$MEM" = "" ]; then echo " No users belong to this group " else echo "Following are the members of the $2 LDAP GROUP" echo "$MEM" fi fi ;; # User Search us) USER1=`ldapsearch -x -b "dc=test,dc=com" "(uid=$2)" | sed -n -e '/^dn/p' | cut -d: -f2`; if [ "$USER1" = "" ]; then echo "User does not exist" else echo $USER1 MEM1=`ldapsearch -x -b "dc=test,dc=com" "(memberUid=$2)" | sed -n -e '/^dn/p' | cut -d: -f2`; echo "$MEM1" fi ;; *) echo "lquery.sh" echo "lquery.sh " ;; esac
# sed 'p' test.txtTo print the Second line in a file
# sed -n '2 p' test.txtTo print from line 1 to line 4
# sed -n '2 p' test.txtTo Print from line 2 through the last line
# sed -n '2,$ p' test.txtTo Print lines matching the pattern “vasanth”
# sed -n '/vasanth/ p' test.txtTo Print lines starting from the 1st match of "Vasanth" until the 4th
# sed -n '/vasanth/,4 p' test.txtTo Print lines starting from the 1st match of "vasanth" until the last line
# sed -n '/vasanth/,$ p' test.txtTo Print lines starting from the line matching "Vasanth" until the line matching "Hemanth":
# sed -n '/Vasanth/,/Hemanth/ p' test.txtTo Print the line matching "Jason" and 2 lines immediately after that
# sed -n '/Vasanth/,+2 p' test.txtDELETE LINES
# sed 'd' test.txtTo delete only the two lines
# sed '2 d' test.txtTo Delete from line 1 through 4
# sed '1,4 d' test.txtTo Delete from line 2 through the last line
# sed '2,$ d' employee.txtTo delete only odd number of lines
# sed '1~2 d' test.txtTo delete lines matching the pattern "Sysadmin"
# sed '/Sysadmin/ d' test.txtTo delete lines starting from the 1st match of "Vasanth" until the 4th line
# sed '/Vasanth/,4 d' test.txtTo delete lines starting from the 1st match of "Vasanth" until the 4th line
# sed '/Vasanth/,4 d' test.txtTo delete lines starting from the 1st match of "Vasanth" until the last line
# sed '/Vasanth/,$ d' test.txtTo delete lines starting from the line matching "Vasanth" until the line matching "Hemanth":
# sed '/Vasanth/,/Hemanth/ d' test.txtTo delete lines starting from the line matching "Vasanth" and 2 lines immediately after that:
# sed '/Vasanth/,+2 d' test.txtUseful Delete Examples
# sed '/^$/ d' test.txtTo delete all comment lines (assuming the comment starts with
# sed '/^#/ d' test.txtTo write the content of text.txt file to file test.txt (and display on screen):
# sed 'w test.txt' text.txtTo write the content of employee.txt file to output.txt file but not to screen:
# sed -n 'w output.txt' /etc/passwdTo write only the 2nd line:
# sed -n '2 w output.txt' /etc/passwdWrite lines 1 through 4:
# sed -n '1,4 w output.txt' /etc/passwd
# sed -n '2,$ w output.txt' /etc/passwdTo write only odd numbered lines:
# sed -n '1~2 w output.txt' /etc/passwdTo Write lines matching the pattern "Vasanth":
# sed -n '/Vasanth/ w output.txt' /etc/passwdTo write lines starting from the 1st match of "root" until the 4th line:
# sed -n '/root/,4 w output.txt' /etc/passwdTo write lines starting from the 1st match of "Raj" until the last line:
# sed -n '/vasanth/,$ w output.txt' /etc/passwdTo write lines starting from the line matching "vasanth" until the line matching "hemanth":
# sed -n '/vasanth/,/hemanth/ w output.txt' /etc/passwdTo write the line matching "vasanth" and the next 2 lines immediately after that:
# sed -n '/vasanth/,+2 w output.txt' /etc/passwd
alias bond0 bonding options bond0 mode=1 miimon=100 use_carrier=0Save the file
mode=0|balanced_rr provides load balancing and fault tolerance mode=1|active-ackup provides fault tolerance primary= Specify which NIC is primary (eg:eth0) use_carrier= How to dittermine link status miimon - Link monitoring frquency in milliseconds
# cd /etc/sysconfig/network-scripts
# vi ifcfg-bond0 DEVICE=bond0 IPADDR=192.168.56.3 BOOTPROTO=none NETMASK=255.255.255.0 GATEWAY=192.168.56.1 ONBOOT=yes TYPE=Ethernet
# cat /etc/sysconfig/network-scripts/ifcg-eth0
DEVICE=eth0 MASTER=bond0 SLAVE=yes BOOTPRO=static ONBOOT=yes
# cat /etc/sysconfig/network-scripts/ifcg-eth1 DEVICE=eth1 MASTER=bond0 SLAVE=yes BOOTPRO=static ONBOOT=yes
# /ect/init.d/ntpd stop
# ntpdate ip.address.of.yourPDC
# /etc/init.d/ntpd start # chkconfig ntpd on
NOTE: Please follow the exact syntax of the krb5.conf file given here.
# vi /etc/krb5.conf
[logging] default = FILE:/var/log/krb5libs.log kdc = FILE:/var/log/krb5kdc.log admin_server = FILE:/var/log/kadmind.log
[libdefaults] default_realm = dns_lookup_realm = yes dns_lookup_kdc = yes
[realms]
EXAMPLE = {
kdc = server.example.com
default_domain = example.com
}
[domain_realm] .example.com = EXAMPLE.COM mydomain.com = EXAMPLE.COM
[kdc] profile = /var/kerberos/krb5kdc/kdc.conf[appdefaults]
pam = {
debug = false
ticket_lifetime = 36000
renew_lifetime = 36000
forwardable = true
krb4_convert = false
}
# yum install samba-*
# yum install winbind
# service smb start #chkconfig smb on
# service winbind start # chkconfig winbind onEnter the following entries in /etc/samba/smb.conf
# /etc/smmba/smb.conf
[global] # NT Workgroup Settings netbios name = CENTOS1 workgroup = EXAMPLE.COM server string = Centos Server
# Samba Performance Settings socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 client schannel = no
# Network Browsing Settings local master = no domain master = no preferred master = no wins support = no dns proxy = no wins proxy = no
# Active Directory Member realm = EXAMPLE.COM security = ads ads server = X.X.X.X (Ip address of your seerver) password server = server.example.com
# Winbind Settings winbind separator = + winbind use default domain = yes idmap uid = 10000-20000 idmap gid = 10000-20000 winbind enum users = yes winbind enum groups = yes winbind cache time = 10
#winbind gid = 10000-20000 #winbind trusted domains only = no
# Defaults for local accounts created by winbind #template shell = /bin/bash template shell = /usr/local/bin/bash-wrapper template homedir = /home/%U
# Logging Settings max log size = 50 log file = /var/log/samba/%m.log
# kinit administrator@EXAMPLE.COMThe exist status of the above command should be 0
# system-config-authenticationPlease follow the screen shots given below
# wbinfo -uTo list all the groups
# wbinfo -gCheck RPC communication
# # wbinfo -tChange the PAM settings for login and ssh
#%PAM-1.0 auth required pam_stack.so service=system-auth auth required pam_nologin.so auth sufficient pam_winbind.so account required pam_stack.so service=system-auth account sufficient pam_winbind.so password required pam_stack.so service=system-auth session required pam_stack.so service=system-auth
#%PAM-1.0 auth required pam_securetty.so auth sufficient pam_winbind.so auth required pam_stack.so service=system-auth auth required pam_nologin.so account sufficient pam_winbind.so account required pam_stack.so service=system-auth password required pam_stack.so service=system-auth # pam_selinux.so close should be the first session rule session required pam_selinux.so close session required pam_stack.so service=system-auth session optional pam_console.so # pam_selinux.so open should be the last session rule session required pam_selinux.so multiple open
OpenLDAP server: krbserver1.fireblade.com Kerberos Server: krbserver1.fireblade.com DNS Server: krbserver1.fireblade.com Client machine: station13.fireblade.com
Setup DNS using bind in krbserver1.fireblade.com. Both forward and reverse record should be set up properly. Kerberos need both forward and reverse dns record to work properly.
# yum install openldap-*Setup LDAP directory manager password
# slapasswdOpen the configuration file and make the following changes.
# vim /etc/openldap/slapd.conf
database bdb
suffix "dc=fireblade,dc=com"
rootdn "cn=Manager,dc=fireblade,dc=com"
rootpw {SSHA}1j20X9NC+axyGp2IzcS086C7MZ6dyCQj
Save the configuration file and restart start the service.
# service ldap start
# chkconfig ldap onCreate LDAP entries by using the following ldif file.
# cat initial.ldif
dn: dc=fireblade,dc=com objectclass: dcObject objectclass: organization o: fireblade.com dc: fireblade
dn: ou=People,dc=fireblade,dc=com objectClass: organizationalUnit objectClass: top ou: People
dn: ou=Groups,dc=fireblade,dc=com objectClass: organizationalUnit objectClass: top ou: Groups
# ldapadd -x -W -D "cn=Manager,dc=fireblade,dc=com" -f initial.ldif
# cat firstuser.ldif
dn: uid=vasanth,ou=People,dc=example,dc=com
objectClass: top
objectClass: account
objectClass: posixAccount
objectClass: shadowAccount
cn: Tammy Something
uid: tammysomething
uidNumber: 3000
gidNumber: 3000
homeDirectory: /home/vasanth
loginShell: /bin/bash
gecos: Tammy Something,Karate Instructor,Room 37A,435-555-555,801-555-555
userPassword: {crypt}x
shadowLastChange: 0
shadowMax: 0
shadowWarning: 0
# ldapadd -x -D "cn=manager,dc=fireblade,dc=com" -w redhat -f firestuser.ldif
# yum install -y krb5-server krb5-workstation
# vi /etc/krb5.conf
[logging] default = FILE:/var/log/krb5libs.log kdc = FILE:/var/log/krb5kdc.log admin_server = FILE:/var/log/kadmind.log[libdefaults]
default_realm = FIREBLADE.COM dns_lookup_realm = false dns_lookup_kdc = false ticket_lifetime = 24h forwardable = yes
[realms]
FIREBLADE.COM = {
kdc = server1.fireblade.com:88
admin_server = server1.fireblade.com:749
default_domain = fireblade.com
}
EXAMPLE.COM = {
kdc = server.example.com
}
[domain_realm]
.fireblade.com = FIREBLADE.COM fireblade.com = FIREBLADE.COM station13.fireblade.com = FIREBLADE.COM[appdefaults]
pam = {
validate = true
debug = false
ticket_lifetime = 36000
renew_lifetime = 36000
forwardable = true
krb4_convert = false
}
# vi /var/kerberos/krb5kdc/kdc.conf
[kdcdefaults] v4_mode = nopreauth kdc_tcp_ports = 88
[realms]
FIREBLADE.COM = {
# master_key_type = des3-hmac-sha1
acl_file = /var/kerberos/krb5kdc/kadm5.acl
dict_file = /usr/share/dict/words
admin_keytab = /var/kerberos/krb5kdc/kadm5.keytab
supported_enctypes = des3-hmac-sha1:normal arcfour-hmac:normal des-hmac-sha1:normal des-cbc-md5:normal des-cbc-crc:normal des-cbc-crc:v4 des-cbc-crc:afs3
default_principal_flags = +preauth
}
# vi /var/kerberos/krb5kdc/kadm5.acl
*/admin@FIREBLADE.COM *
# kdb5_util create -r FIREBLADE.COM -s
Loading random data Initializing database '/var/kerberos/krb5kdc/principal' for realm 'FIREBLADE.COM', master key name 'K/M@FIREBLADE.COM' You will be prompted for the database Master Password. It is important that you NOT FORGET this password. Enter KDC database master key: Re-enter KDC database master key to verify: [root@krb-kdc1 ~]# ls /var/kerberos/krb5kdc/* /var/kerberos/krb5kdc/kadm5.acl /var/kerberos/krb5kdc/principal /var/kerberos/krb5kdc/principal.kadm5.lock /var/kerberos/krb5kdc/kdc.conf /var/kerberos/krb5kdc/principal.kadm5 /var/kerberos/krb5kdc/principal.ok
Authenticating as principal root/admin@FIREBLADE.COM with password. kadmin.local: addprinc root/admin WARNING: no policy specified for root/admin@FIREBLADE.COM; defaulting to no policy Enter password for principal "root/admin@FIREBLADE.COM": Re-enter password for principal "root/admin@FIREBLADE.COM": Principal "root/admin@FIREBLADE.COM" created. kadmin.local: addprinc vasanth WARNING: no policy specified for vasanth@FIREBLADE.COM; defaulting to no policy Enter password for principal "vasanth@FIREBLADE.COM": Re-enter password for principal "vasanth@FIREBLADE.COM": Principal "vasanth@FIREBLADE.COM" created. kadmin.local: ktadd -k /var/kerberos/krb5kdc/kadm5.keytab kadmin/admin Entry for principal kadmin/admin with kvno 3, encryption type AES-256 CTS mode with 96-bit SHA-1 HMAC added to keytab WRFILE:/var/kerberos/krb5kdc/kadm5.keytab. Entry for principal kadmin/admin with kvno 3, encryption type AES-128 CTS mode with 96-bit SHA-1 HMAC added to keytab WRFILE:/var/kerberos/krb5kdc/kadm5.keytab. Entry for principal kadmin/admin with kvno 3, encryption type Triple DES cbc mode with HMAC/sha1 added to keytab WRFILE:/var/kerberos/krb5kdc/kadm5.keytab. Entry for principal kadmin/admin with kvno 3, encryption type ArcFour with HMAC/md5 added to keytab WRFILE:/var/kerberos/krb5kdc/kadm5.keytab. Entry for principal kadmin/admin with kvno 3, encryption type DES with HMAC/sha1 added to keytab WRFILE:/var/kerberos/krb5kdc/kadm5.keytab. Entry for principal kadmin/admin with kvno 3, encryption type DES cbc mode with RSA-MD5 added to keytab WRFILE:/var/kerberos/krb5kdc/kadm5.keytab. kadmin.local: ktadd -k /var/kerberos/krb5kdc/kadm5.keytab kadmin/changepw Entry for principal kadmin/changepw with kvno 3, encryption type AES-256 CTS mode with 96-bit SHA-1 HMAC added to keytab WRFILE:/var/kerberos/krb5kdc/kadm5.keytab. Entry for principal kadmin/changepw with kvno 3, encryption type AES-128 CTS mode with 96-bit SHA-1 HMAC added to keytab WRFILE:/var/kerberos/krb5kdc/kadm5.keytab. Entry for principal kadmin/changepw with kvno 3, encryption type Triple DES cbc mode with HMAC/sha1 added to keytab WRFILE:/var/kerberos/krb5kdc/kadm5.keytab. Entry for principal kadmin/changepw with kvno 3, encryption type ArcFour with HMAC/md5 added to keytab WRFILE:/var/kerberos/krb5kdc/kadm5.keytab. Entry for principal kadmin/changepw with kvno 3, encryption type DES with HMAC/sha1 added to keytab WRFILE:/var/kerberos/krb5kdc/kadm5.keytab. Entry for principal kadmin/changepw with kvno 3, encryption type DES cbc mode with RSA-MD5 added to keytab WRFILE:/var/kerberos/krb5kdc/kadm5.keytab. kadmin.local: exit
# /etc/init.d/krb5kdc start; /etc/init.d/kadmin start ; chkconfig krb5kdc on; chkconfig kadmin on
Copy krb5.conf file to the client machine station13.fireblade.com
# scp -r /etc/krb5.conf root@station13.fireblade.com:/etc
# kadmin.local Authenticating as principal root/admin@FIREBLADE.COM with password. kadmin.local: addprinc -randkey host/krbserver1.fireblade.com WARNING: no policy specified for host/krbserver1.fireblade.com@FIREBLADE.COM; defaulting to no policy Principal "host/krbserver1.fireblade.com@FIREBLADE.COM" created. kadmin.local: ktadd host/krbserver1.fireblade.com
kadmin.local: exit
# kadmin
# nmap -v localhost
# /usr/share/namp/nmap-service
# nmap -V -oN namp.scan.1 localhost
# namp -v -sU localhost
# namp -v -p 631 localhost
# nmap -v -o remoteserver
# namp iL filename
To list all the machine that are up and running in the current networl
# namp -iL uu
# vi /etc/syslog.confAdd the following lines
kern.* /dev/console
*.info;mail,authpriv,cron,kern.none /dev/console
# /etc/init.d/syslogd restart
# yum install vnc-server
# vi /etc/sysconfig/vncservers VNCSERVERS="1:root" :wq
# vncpasswd
# vncviewer 192.168.56.2:1
# yum install openldap-*
# cp /usr/share/openldap-servers/slapd.conf.obsolete /etc/openldap/slapd.conf
# cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIG
# chown ldap.ldap /var/lib/ldap/DB_CONFIG
# rm -rf /etc/openldap/slapd.d/*
# vim /etc/openldap/slapd.conf
database bdb suffix "dc=fireblade,dc=com" checkpoint 1024 15 rootdn "cn=Manager,dc=fireblade,dc=com"
rootpw redhat
moduleload syncprov.laSave the configuration file.
serverID 001 syncrepl rid=000 provider=ldap://192.168.56.192 type=refreshAndPersist retry="5 5 300 +" searchbase="dc=fireblade,dc=com" attrs="*,+" bindmethod=simple binddn="cn=manager,dc=fireblade,dc=com" credentials=redhat
syncrepl rid=001 provider=ldap://192.168.56.193 type=refreshAndPersist retry="5 5 300 +" searchbase="dc=fireblade,dc=com" attrs="*,+" bindmethod=simple binddn="cn=manager,dc=fireblade,dc=com" credentials=redhat
index entryCSN eq index entryUUID eq
mirrormode TRUE
overlay syncprov
syncprov-checkpoint 100 10
serverID 002 syncrepl rid=000 provider=ldap://192.168.56.191 type=refreshAndPersist retry="5 5 300 +" searchbase="dc=fireblade,dc=com" attrs="*,+" bindmethod=simple binddn="cn=manager,dc=fireblade,dc=com" credentials=redhat
syncrepl rid=001 provider=ldap://192.168.56.193 type=refreshAndPersist retry="5 5 300 +" searchbase="dc=fireblade,dc=com" attrs="*,+" bindmethod=simple binddn="cn=manager,dc=fireblade,dc=com" credentials=redhat
index entryCSN eq index entryUUID eq
mirrormode TRUE
overlay syncprov
syncprov-checkpoint 100 10
provider=ldap://192.168.56.191 type=refreshAndPersist retry="5 5 300 +" searchbase="dc=fireblade,dc=com" attrs="*,+" bindmethod=simple binddn="cn=manager,dc=fireblade,dc=com" credentials=redhat
provider=ldap://192.168.56.192 type=refreshAndPersist retry="5 5 300 +" searchbase="dc=fireblade,dc=com" attrs="*,+" bindmethod=simple binddn="cn=manager,dc=fireblade,dc=com" credentials=redhatindex entryCSN eq index entryUUID eq
overlay syncprovsyncprov-checkpoint 100 10
# /etc/init.d/slapd start
In refreshOnly type of replication the consumer (1) initiates a connection (2) with the provider (2) - synchronization of DITs takes places and the connection is broken. Periodically the consumer (1) re-connects (2) with the provider (3) and re-synchronizes. refreshOnly synchronization may be viewed as operating in burst mode and the replication cycle time is the time between re-connections.Master LDAP server - ldap-master.fireblade.com - Provider
# NOTE: # the provider configuration contains no reference to any consumers
# define the provider to use the syncprov overlay # (last directives in database section) overlay syncprov # allows contextCSN to saves to database every 100 updates or ten minutes syncprov-ch syncprov-checkpoint 100 10
# provider is ldap://master-ldap.example.com:389, sync interval # every 1 hour, whole DIT (searchbase), all user attributes synchronized # simple security with cleartext password # NOTE: comments inside the syncrepl directive are rejected by OpenLDAP # and are included only to carry further explanation. They MUST NOT # appear in an operational file syncrepl rid=000 provider=ldap://ldap-master.fireblade.com type=refreshOnly #re-connect/re-sync every hour interval=00:1:00:00 retry="5 5 300 +" searchbase="dc=example,dc=com" #both user (*) and operational (+) attributes required attrs="*,+" bindmethod=simple binddn="cn=Manager,dc=fireblade,dc=com" #Warning: password sent in clear - insecure credentials=dirtysecret
# service ldap restart
1. ldap-master.fireblade.com (Master Server) 2. ldap1.fireblade.com (client Server)
# slapcat > master.ldif
# ldapadd -D "cn=Manager,dc=dc1,dc=fireblade,dc=com" -W -x -f initial.ldifAt this point both master and slave has the exact amount of data. Let's start the replication configuration.
# Keep the sapce in front of binddn as it is bbecause replica uri=ldap://ldap1.fireblade.com bindmethod=simple binddn="cn=manager,dc=fireblade,dc=com" credentials=redhat
updatedn "cn=manager,dc=fireblade,dc=com"
updateref ldap://ldap-master.fireblade.com:389
# service ldap restart
# slapd -d 1
# slurpd -d 1
1. master-ldap.fireblade.com - 192.168.56.10
2. ldap1.fireblade.com - 192.168.56.21
dn: ou=us,dc=fireblade,dc=com ref: ldap://master-ldap.fireblade.com/ou=us,dc=fireblade,dc=com ou: us objectClass: referral objectClass: extensibleObject objectClass: topAdd the new entry to LDAP using the below command
# ldapadd -D "cn=Manager,dc=fireblade,dc=com" -W -x -f new.ldif
suffix "dc=fireblade,dc=com"
rootdn "cn=Manager,dc=fireblade,dc=com"
rootpw {SSHA}U0DavqxmDkhcPK9qpaJzxRM7r/GFtptM
# vim add.ldif
dn: dc=fireblade,dc=com objectclass: dcObject objectclass: organization o: fireblade.com dc: fireblade
dn: ou=us,dc=fireblade,dc=com objectClass: organizationalUnit objectClass: top ou: us
dn: cn=nagaraj,ou=People,dc=fireblade,dc=com objectClass: posixAccount objectClass: top objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson cn: nagaraj gidNumber: 20001 homeDirectory: /home/nagaraj sn: Sulthan Munaver uid: sulthan uidNumber: 20000 manager: uid=suresh,ou=People,dc=fireblade,dc=com telephoneNumber: 666677777777 userPassword:: e1NIQX1QSFo4UWEreEt0b1VBWkR0Z3RzLzJURGk3Nk09
# ldapadd -D "cn=Manager,dc=fireblade,dc=com" -W -x -f add.ldif
Now the ldap1.fireblade.com server configured with cn=nagaraj,ou=us,dc=fireblade,dc=com
# ldapsearch -C -h master-ldap.fireblade.com -x -b "ou=us,dc=fireblade,dc=com" "(uid=nagaraj)"
# ngaraj, us, fireblade.com dn: cn=ngaraj,ou=us,dc=fireblade,dc=com uid: nagaraj gidNumber: 5010 sn: Nagraj Nagmangala cn: ngaraj homeDirectory: /home/nagraj objectClass: posixAccount objectClass: top objectClass: person objectClass: inetOrgPerson objectClass: organizationalPerson uidNumber: 5010
master-ldap1.fireblade.com - 192.168.56.22
# vim /etc/openldap/slapd.confadd the below lines.
database bdb suffix dc=fireblade,dc=net" rootdn "cn=Manager,dc=fireblade,dc=net" rootpw redhat
directory /var/lib/ldap/firenix-net
index objectClass eq,pres index ou,cn,mail,surname,givenname eq,pres,sub index uidNumber,gidNumber,loginShell eq,pres index uid,memberUid eq,pres,sub index nisMapName,nisMapEntry eq,pres,sub
# /etc/init.d/ldap restart
dn: dc=fireblade,dc=net dc: fireblade description: Example Network Operations objectClass: dcObject objectClass: organization o: Firenix, Inc.
dn: ou=people, dc=fireblade,dc=net ou: people description: All people in organisation objectClass: organizationalUnit
# ldapadd -D "cn=Manager,dc=fireblade,dc=net" -W -x -f test.ldif
0: o=suffix 1: cn=Manager,o=suffix 2: ou=people,o=suffix 3: uid=kdz,ou=people,o=suffix 4: cn=addresses,uid=kdz,ou=people,o=suffix 5: uid=hyc,ou=people,o=suffixThen:
dn.base="ou=people,o=suffix" match 2; dn.one="ou=people,o=suffix" match 3, and 5; dn.subtree="ou=people,o=suffix" match 2, 3, 4, and 5; and dn.children="ou=people,o=suffix" match 3, 4, and 5.