Class LDAPModify
- java.lang.Object
-
- LDAPModify
-
public class LDAPModify extends java.lang.Object
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
Fields Modifier and Type Field Description protected static java.lang.String
m_binddn
protected static LDAPConnection
m_client
protected static int
m_debugLevel
protected static int
m_hopLimit
protected static boolean
m_justShow
protected static java.lang.String
m_ldaphost
protected static int
m_ldapport
protected static boolean
m_ordinary
protected static java.lang.String
m_passwd
protected static LDAPControl
m_proxyControl
protected static boolean
m_referrals
protected static boolean
m_verbose
protected static int
m_version
-
Constructor Summary
Constructors Constructor Description LDAPModify()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static void
extractParameters(java.lang.String[] args)
This class-method is used to extract specified parameters from the arguments list.protected static GetOpt
extractParameters(java.lang.String privateOpts, java.lang.String[] args)
This function is to extract specified parameters from the arguments list.static void
main(java.lang.String[] args)
protected static void
setDefaultReferralCredentials(LDAPConstraints cons)
-
-
-
Field Detail
-
m_ldapport
protected static int m_ldapport
-
m_binddn
protected static java.lang.String m_binddn
-
m_ldaphost
protected static java.lang.String m_ldaphost
-
m_passwd
protected static java.lang.String m_passwd
-
m_version
protected static int m_version
-
m_debugLevel
protected static int m_debugLevel
-
m_hopLimit
protected static int m_hopLimit
-
m_referrals
protected static boolean m_referrals
-
m_client
protected static LDAPConnection m_client
-
m_justShow
protected static boolean m_justShow
-
m_verbose
protected static boolean m_verbose
-
m_ordinary
protected static boolean m_ordinary
-
m_proxyControl
protected static LDAPControl m_proxyControl
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
-
extractParameters
protected static void extractParameters(java.lang.String[] args)
This class-method is used to extract specified parameters from the arguments list.
-
extractParameters
protected static GetOpt extractParameters(java.lang.String privateOpts, java.lang.String[] args)
This function is to extract specified parameters from the arguments list.- Parameters:
args
- list of args
-
setDefaultReferralCredentials
protected static void setDefaultReferralCredentials(LDAPConstraints cons)
-
-