Solaris 8 with OpenLDAP: Scripts
Sample Scripts for Account Management
Here are some scripts I have written for manipulating users within the directory server. One thing to notice is that if you create a file named /var/tmp/noupdate, then all of the scripts that make modifications will fail.If you use any of this helpful or useful, drop me a line at eric@ypass.net and let me know. I generally make updates to this code to add features, bug fixes, etc.
Useful PHP scripts for LDAP manipulation:
- EKldapscripts-1.0.tar.gz
-
A tar file of all of the scripts mentioned below.
- LDAP Class for PHP (required for everything below)
-
A PHP class used for manipulating an LDAP directory. Full
documentation can be found at the LDAP Class for PHP
homepage
- USER Class for PHP (required for everything below)
-
A PHP class used for manipulating users inside an LDAP directory.
- passwdLDAP.php
-
Modifies a user's password.
- adduserLDAP.php
-
Adds a user to the directory.
- deluserLDAP.php
-
Deletes a user from the directory.
- lockuserLDAP.php
-
Locks a user by adding a *LK* in front of the user's password.
- unlockuserLDAP.php
-
Unlocks a user that was previously locked with lockuserLDAP.php
- passwd2ldif.php
-
Converts a standard passwd file or niscat passwd table dump to an LDIF file
to be used for importing users.
- ldapmatch.php
-
Displays a users passwd entry in passwd file format. It is similar to nismatch.
- ldapgrep.php
-
"GREPs" through the LDAP directory passwd entries. It is similar to nisgrep.