LDAP Commands
LDAP Commands
LDAP Commands
Servers
Directory Information Trees (DITs)
Entry Administration
Password Resets
Entry addition, deletion and modification
Looking for entries
Starting and Stopping the Server
Logs
Troubleshooting
Is my Server Cliented?
Clienting your server
Servers
The servers are tssp0027 (MPC) and tssp0028 (JGC)
Access to the GUI using web interface: http://10.4.131.211/dscc. Sign on as
admin.
The following dsconf commands are useful for gathering info on the server:
/opt/product/ldap/dsee/ds6/bin/dsconf info
/opt/product/ldap/dsee/ds6/bin/dsconf get-server-prop
/opt/product/ldap/dsee/ds6/bin/dsconf get-suffix-prop dc=uk,dc=tslp
/opt/product/ldap/dsee/ds6/bin/dsconf list-suffixes
/opt/product/ldap/dsee/ds6/bin/dsconf list-suffixes -v
You can also get this from the GUI
Directory Information Trees
There are two DIT's:
dc=uk,dc=tsl for T-Systems servers (tssp*)
and
dc=uk,dc=centricaplc,dc=com for Centrica servers (cnsv*)
The servers will be ldapclient'd to one or other of these.
The contents of these DIT's are backed up every night to
/opt/product/ldap/ds/ldif by /opt/product/ldap/ds/backup.sh
Entry Administration
Password resets
This can be done via the GUI if it's working (which it probably isn't).
There are other methods that can be done on the command line:
Option 1 : As root on your LDAP client, run passwd -r ldap userid
Option 2 : As root on tssp0027, run /var/opt/ldap/reset_password userid
Option 3 : use ldapmodify and an LDIF file. Do this on tssp0027. This is a bit
more complicated, and is a manual version of option 2.
Run /var/opt/ldap/generatepw userid
This will produce an encrypted version of userid
Create a file containing the following LDIF:
dn:uid=userid,ou=people,dc=uk,dc=centricaplc,dc=com
changetype:modify
replace:userpassword
userpassword:{crypt}Encrypted userid
Run ldapmodify -h 10.4.131.21 -D 'cn=directory manager' -w passw
ord123 <
Your LDIF file
Entry addition, deletion and modification
Scripts are held in /var/opt/ldap, with centrica and tsl subdirectories.
To update groups, passwd or netgroups you should update the relevant flat file
in one of those directories and run /var/opt/ldap/ldap_sync.pl
e.g. to add a passwd entry to Centrica DIT
cd /var/opt/ldap/centrica
edit passwd to add your entry
Note: It's probably worth adding the user to NIS+ first to geta unique UID.
Edit the netgroup file if necessary
Note: Your userid must be defined in the netgroup for the server it needs to
get on to.
Don't change directories !
Run /var/opt/ldap/sync-ldap.pl centrica. This will produce up to 3 files
(add*, delete* modify*) containing LDIF that can be used to update LDAP.
Run ldapmodify -h 10.4.131.21 -D 'cn=directory manager' -w password123< file
containing LDIF for all 3 files.
Looking for Entries
There are a couple of methods to search for entries defined in LDAP. The easiest
method is to use ldaplist from the LDAP client. Alternatively, you can used the
more powerful ldapsearch command, which is a bit harder to use.
ldaplist
Note: ldaplist only lists entries for the DIT that the client resides in.
ldaplist passwd - All password entries
ldaplist -l passwd watersd - detailed info for watersd
ldaplist group - All groups
ldaplist netgroup - All Netgroups
ldapsearch
e.g. ldapsearch -D 'cn=directory manager' -w password123 -b 'dc=uk,dc=tsl' uid=*