Class LDAPModify
java.lang.Object
LDAPTool
LDAPModify
Executes modify, delete, add, and modRDN.
This class is implemented based on the java LDAP classes.
usage : java LDAPModify [options] example : java LDAPModify -D "uid=johnj,ou=People,o=Airius.com" -w "password" -h ldap.netscape.com -p 389 -f modify.cfg options: {np = no parameters, p = requires parameters} 'D' bind DN --------------------------------------------- p 'w' bind password --------------------------------------- p 'f' input file ------------------------------------------ p 'h' LDAP host ------------------------------------------- p 'p' LDAP port ------------------------------------------- p 'e' record rejected records in a text file -------------- p 'c' continuous, do not stop on error ------------------- np 'a' add, if no operation is specified ------------------ np 'r' replace, if no operation is specified -------------- np 'b' binary, read values starting with / from a file ---- np 'd' debugging level ------------------------------------- p 'V' version, specify LDAP protocol version (2 or 3) ----- p 'R' do not follow referrals ---------------------------- np 'O' hop limit ------------------------------------------- p 'H' help, display usage--------------------------------- np 'M' manage referrals, do not follow them --------------- np 'n' show what would be done but do not do it ----------- np 'v' verbose mode --------------------------------------- np 'e' reject file, where to list rejected records --------- p 'y' proxy DN, DN to use for access control -------------- p note: '-' or '/' is used to mark an option field. e.g. -a -b /c /d parameter -e parameter
- Version:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static boolean
private static boolean
private static boolean
private static String
private static boolean
private static LDIF
private static String
Fields inherited from class LDAPTool
m_binddn, m_client, m_debugLevel, m_hopLimit, m_justShow, m_ldaphost, m_ldapport, m_ordinary, m_passwd, m_proxyControl, m_referrals, m_verbose, m_version
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static LDAPAttribute
checkFiles
(LDAPAttribute attr) Read in binary data for values specified with a leading /private static void
doModify()
Call the LDAPConnection modify operation with the specified options, and/or parameters.private static void
doUsage()
Prints usage.protected static void
extractParameters
(String[] args) This class-method is used to extract specified parameters from the arguments list.static void
Methods inherited from class LDAPTool
extractParameters, setDefaultReferralCredentials
-
Field Details
-
m_continuous
private static boolean m_continuous -
m_force
private static boolean m_force -
m_add
private static boolean m_add -
m_binaryFiles
private static boolean m_binaryFiles -
m_rejectsFile
-
m_ldif
-
m_file
-
-
Constructor Details
-
LDAPModify
public LDAPModify()
-
-
Method Details
-
main
-
doUsage
private static void doUsage()Prints usage. -
extractParameters
This class-method is used to extract specified parameters from the arguments list. -
doModify
Call the LDAPConnection modify operation with the specified options, and/or parameters.- Throws:
IOException
-
checkFiles
Read in binary data for values specified with a leading /- Parameters:
attr
- Source attribute.- Returns:
- Updated attribute.
-