com.waveset.adapter
Class AIXResourceAdapter

java.lang.Object
  extended bycom.waveset.adapter.ResourceAdapterBase
      extended bycom.waveset.adapter.GenericScriptResourceAdapter
          extended bycom.waveset.adapter.UnixResourceAdapter
              extended bycom.waveset.adapter.AIXResourceAdapter
All Implemented Interfaces:
ResourceAdapter, ResourcePolicyTimeouts
Direct Known Subclasses:
SP2ResourceAdapter

public class AIXResourceAdapter
extends UnixResourceAdapter

Resource adapter supporting AIX version 4.3 (and possibly other versions) by using shell script commands through a scripted connection.


Nested Class Summary
protected  class AIXResourceAdapter.AcctIter
          AccountIterator implementation that can be built by construction from the output of "lsuser ALL".
protected  class AIXResourceAdapter.BlockAcctIter
          BlockAccountIterator implementation that can be built by construction from the output of "lsuser -a ALL".
 
Nested classes inherited from class com.waveset.adapter.ResourceAdapterBase
ResourceAdapterBase.SimpleAccountIterator
 
Nested classes inherited from class com.waveset.adapter.ResourceAdapter
ResourceAdapter.ActionResult, ResourceAdapter.Features, ResourceAdapter.ObjectType
 
Field Summary
protected static java.util.Map allowedNISAttributes
           
static java.lang.String ATTR_COMMENT
           
static java.lang.String ATTR_GROUP
           
static java.lang.String ATTR_HOME
           
static java.lang.String ATTR_PWD_ADMCHG
           
static java.lang.String ATTR_PWD_ADMIN
           
static java.lang.String ATTR_PWD_NOCHECK
           
static java.lang.String ATTR_SHELL
           
protected static java.lang.String CMD_CHGROUP
           
protected static java.lang.String CMD_CHGRPMEM
           
protected static java.lang.String CMD_CHSEC
           
protected static java.lang.String CMD_CHUSER
           
protected static java.lang.String CMD_LSSEC
           
protected static java.lang.String CMD_LSUSER
           
protected static java.lang.String CMD_MKGROUP
           
protected static java.lang.String CMD_MKUSER
           
protected static java.lang.String CMD_PASSWD
           
protected static java.lang.String CMD_PWUSER
           
protected static java.lang.String CMD_RMGROUP
           
protected static java.lang.String CMD_RMUSER
           
static java.lang.String code_id
           
protected static java.lang.String DEFAULT_SHELL
           
static java.lang.String[] DEFAULT_SHELLS
           
static java.lang.String DISPLAY_PASSWORD
           
static java.lang.String DISPLAY_USER
           
protected  java.lang.String grpMutexFile
           
protected  java.lang.String grpPidFile
           
protected  boolean isAdminUser
           
static java.lang.String LOGIN_PASSWORD
           
static java.lang.String LOGIN_USER
           
protected  java.lang.String pwdMutexFile
           
protected  java.lang.String pwdPidFile
           
static java.lang.String RA_IS_ADMIN_USER
           
static java.lang.String RA_RM_USER_FROM_ETC_SECURITY
           
static java.lang.String RESOURCE_NAME
           
static java.lang.String RESOURCE_USER_FORM
           
protected  java.lang.String rmUserFlag
           
protected  java.lang.String tmpGrpMutexFile
           
protected  java.lang.String tmpPwdMutexFile
           
 
Fields inherited from class com.waveset.adapter.UnixResourceAdapter
CMD_AWK, CMD_CAT, CMD_CHMOD, CMD_CHOWN, CMD_CP, CMD_CUT, CMD_DIFF, CMD_ECHO, CMD_GREP, CMD_GROUPADD, CMD_GROUPDEL, CMD_GROUPMOD, CMD_LAST, CMD_LISTUSERS, CMD_LOGINS, CMD_LS, CMD_MAKE, CMD_MV, CMD_RM, CMD_SED, CMD_SLEEP, CMD_SORT, CMD_SUDO, CMD_TAIL, CMD_TOUCH, CMD_USERADD, CMD_USERDEL, CMD_USERMOD, CMD_WHICH, CMD_YPCAT, CMD_YPMATCH, CMD_YPPASSWD, loginPass, loginShellPrompt, loginUser, ONE_TAIL, RA_ALT_ROOT_SHELL_PROMPT, RA_DEL_HOME_DIR, RA_HOME_BASEDIR, RA_LOGIN_SHELL_PROMPT, RA_NISDIR, RA_NISPWDDIR, RA_NISSRCDIR, RA_ROOT_PASSWORD, RA_ROOT_SHELL_PROMPT, RA_ROOT_USER, RA_SUDO_AUTH, RA_SYS_DB_TYPE, removeAction, rootPass, rootPromptCaptureToken, rootPromptCaptureTokenOrig, rootPromptWaitToken, rootPromptWaitTokenOrig, rootShellPrompt, rootShellPromptOrig, rootUser, sudoResetCmd, sudoResetToken, sudoStartCmd, sudoStartToken, wavesetRootPrompt, wavesetRootPromptCaptureToken, wavesetRootPromptWaitToken
 
Fields inherited from class com.waveset.adapter.GenericScriptResourceAdapter
conn, RA_BLOCK_FETCH_TIMEOUT, RA_CONN_MAX, RA_CONN_TIMEOUT, RA_CONN_TYPE, RA_HOST, RA_LOGIN_PASSWORD, RA_LOGIN_USER, RA_PORT, RA_TERM
 
Fields inherited from class com.waveset.adapter.ResourceAdapterBase
_cache, _context, _excludedAccountsRule, _excludedAccountsRuleInited, _listAllObjectsAttrParse, _listAllObjectsAttrParseName, _listUserAttrParse, _listUserAttrParseName, _listUserGroupsAttrParse, _listUserGroupsAttrParseName, _resource, _thread, _trace, displayInfoCode, RA_BLOCKCOUNT, RA_LOGIN_ACTION, RA_LOGOFF_ACTION, RA_MULTI_VALUED_ATTRS, RA_TEST_MODE
 
Fields inherited from interface com.waveset.adapter.ResourceAdapter
CHANGE_PASSWORD_LOCATION, DISABLE, ENABLE, EXPIRE_PASSWORD, GUID, IGNORE_ATTR, NEW_ACCOUNT_ID, OP_DAYS_INACTIVE, OP_DISABLED, OP_DORMANT, OP_EXPIRED, OP_EXPIREDPWD, OP_INACTIVE, OP_LOCKED, OP_NO_PASSWORD_SET, OP_NOOWNERSHIP, OP_NOPASSWORDREQ, OP_NUMINACTIVEDAYS, OP_NUMPWDAYS, OP_PWNUMDAYS, RA_BASE_CTX, RA_DISPLAY_NAME_ATTR, RA_NEW_OBJECT_ID, RA_NEW_OBJECT_NAME, RA_OBJECT_ATTRIBUTES, RA_OBJECT_CLASS, RA_OBJECT_ID, RA_OBJECT_TYPE, RA_OP_TYPE, RA_RENAME_OP, RA_REQUESTOR, RA_SAVEAS_OP, RA_SEARCH_ATTRIBUTE_NAMES, RA_SEARCH_ATTRS_TO_GET, RA_SEARCH_CONTEXT, RA_SEARCH_FILTER, RA_SEARCH_RUN_AS_PASSWORD, RA_SEARCH_RUN_AS_USER, RA_SEARCH_SCOPE, RA_SEARCH_SCOPE_OBJECT, RA_SEARCH_SCOPE_ONE_LEVEL, RA_SEARCH_SCOPE_SUBTREE, RA_SEARCH_TIME_LIMIT, RESET_PASSWORD, SYSTEM_ATTRIBUTES, UNLOCK, WS_USER_PASSWORD
 
Constructor Summary
AIXResourceAdapter()
          No argument constructor.
AIXResourceAdapter(Resource res, ObjectCache cache)
          Constructor
 
Method Summary
protected  void addNISMake(java.lang.String target, Script script)
           
protected  void addNISPasswordUpdate(java.lang.String account, java.lang.String password, Script script)
           
protected  void addNISShellUpdate(java.lang.String account, java.lang.String shell, Script script)
           
protected  void addPwdAdmAttr(WSUser user, java.lang.StringBuffer buf)
           
protected  void addPwdAdmCmd(WSUser user, Script script)
          Add the pwdadm command to the script.
protected  void addPwdAdmFlag(java.lang.String flagName, java.lang.Boolean value, java.lang.StringBuffer buf)
          If the value is not null and true, then add it to the buffer.
protected  void addPwdAdmFlag(WSUser user, java.lang.String mapName, java.lang.String flagName, java.lang.StringBuffer buf)
          Get the value of the specified attr and add the corresponding pwdadm flag if the attr's value is true.
protected  java.lang.String addUid(WSUser user, java.lang.String userAttrParms)
           
protected  void addUpdatePwdAdmCmd(WSUser user, Script script)
          Adds commands to the script to set the pwdadm flags appropriately.
protected  void badGroupsMessage(java.lang.String badGroups, WavesetResult result)
           
protected  WSUser buildUser(java.lang.String userStr, WSUser targetUser)
          Build a WSUser from the output of the "lsuser" command.
protected  void changeNISGroupMembers(java.lang.String group, java.lang.String users, Script script)
          Add commands to the script that will check to see which users exist.
protected  void checkGroups(WSUser user, Script script)
          Add commands to the script that will check to see which groups exist and only attempt to add the user to those groups that exist.
protected  java.util.Map constructNISUserAttributeParameters(WSUser user, java.util.Map allowedAttributes)
           
protected  java.lang.String constructUserAttributeParameter(java.lang.String key, java.lang.String value)
          Builds up a single user attribute value suitable for the chuser command, given the parameter key and value.
 Resource createPrototypeResource()
          Non-static version of staticCreatePrototypeResource()
protected  void filterPwdAdmFlag(java.lang.Boolean value, java.lang.String flagName, Script script)
          Remove the flag from WSADMOUT if the corresponding attribute value is false.
protected  AccountIterator getAccountIteratorResult(CaptureList captureList)
          Generates an account iterator from the capture list that was built from running the getAccountIteratorScript generated script through the ScriptedConnection.
protected  Script getAccountIteratorScript()
          Returns a script that can be run on an opened and logged in ScriptedConnection to pull a list of users out of the system.
protected  Script getAccountIteratorScript(long timeout)
           
protected  Script getAccountIteratorScript(long timeout, boolean hasTimeout)
          Returns a script that can be run on an opened and logged in ScriptedConnection to pull a list of users out of the system.
protected  WavesetResult getAuthenticateResult(java.util.HashMap loginInfo, CaptureList captureList)
          Takes the capture list from running the authenticate script through the resource and validates it.
protected  Script getAuthenticateScript(java.util.HashMap loginInfo)
          Generates a script for authenticating a user on the resource using the username and password in the loginInfo HashMap.
protected  Script getBlockAccountIteratorScript(long timeout, boolean hasTimeout)
          Returns a script that can be run on an opened and logged in ScriptedConnection to pull a list of users out of the system.
protected  WavesetResult getCheckCreateAccountResult(CaptureList captureList)
          Validates the capture list returned from the check create account script execution.
protected  Script getCheckCreateAccountScript()
          Returns a shell script to check the resource and determine if a create account request is likely to succeed.
protected  WavesetResult getCheckDeleteAccountResult(CaptureList captureList)
          Validates the capture list returned from the delete create account script execution.
protected  Script getCheckDeleteAccountScript()
          Returns a shell script to check the resource and determine if a delete account request is likely to succeed.
protected  WavesetResult getCheckUpdateAccountResult(CaptureList captureList)
          Validates the capture list returned from the check update account script execution.
protected  Script getCheckUpdateAccountScript()
          Returns a shell script to check the resource and determine if an update account request is likely to succeed.
protected  WavesetResult getConnectionTestResult(CaptureList captureList)
          Evaluates capture list from execution of generic test connection script.
protected  Script getConnectionTestScript()
          Creates a script to test the connection, does NOT login or logout.
protected  java.lang.String getConnectionType()
          Returns the scripted connection type of the resource.
protected  Script getCreateNativeGroupScript(java.lang.String groupName, GenericObject attrs, java.util.Map options, boolean isSaveAs)
          Generates a script that will create a group on the resource.
protected  Script getCreateNativeUserScript(WSUser user, java.lang.String accountID, java.lang.String password)
          Generates a script that will create an account for the passed user on the resource.
protected  Script getCreateNISGroupScript(java.lang.String groupName, GenericObject attrs, java.util.Map options, boolean isSaveAs)
           
protected  Script getCreateNISUserScript(WSUser user, java.lang.String accountID, java.lang.String password)
           
protected  WavesetResult getCreateUserResult(CaptureList captureList)
           
protected  void getCreateUserResult(CaptureList captureList, WavesetResult result)
          Analyzes the capture list generated by executing the create user script on the scripted connection.
protected  Script getCreateUserScript(java.lang.String userName, GenericObject attrs, java.util.Map options, boolean isSaveAs)
          Generates a script that will create a user account on the resource.
protected  java.util.List getDefaultShellsList()
           
protected  Script getDeleteNativeGroupScript(GenericObject object, java.util.Map options)
          Generates a script that will delete a group on the resource.
protected  Script getDeleteNativeUserScript(java.lang.String accountID)
          Generates a script that will delete the account of the passed user on the resource.
protected  Script getDeleteNativeUserScript(WSUser user, java.lang.String accountID)
          Generates a script that will delete the account of the passed user on the resource.
protected  Script getDeleteNISGroupScript(GenericObject object, java.util.Map options)
           
protected  Script getDeleteNISUserScript(WSUser user, java.lang.String accountID)
          Generates a script that will delete the account of the passed user on the resource.
protected  void getDeleteUserResult(CaptureList captureList)
          Analyzes the capture list generated by executing the delete user script on the scripted connection.
protected  Script getDeleteUserScript(GenericObject object, java.util.Map options)
          Generates a script that will delete a user account on the resource.
protected  boolean getDisableUserResult(CaptureList captureList)
          Analyzes the capture list generated by executing the disable user script on the scripted connection.
protected  Script getDisableUserScript(WSUser user, java.lang.String password)
          Generates a script that will disable an account for the passed user on the resource.
protected  boolean getEnableUserResult(CaptureList captureList)
          Analyzes the capture list generated by executing the enable user script on the scripted connection.
protected  Script getEnableUserScript(WSUser user, java.lang.String password)
          Generates a script that will enable an account for the passed user on the resource.
 GenericObject getFeatures()
          Expose features supported by the Resource Adapter.
protected  GenericObject getGetGroupResult(java.lang.String objectName, java.util.List attrsToGet, CaptureList captureList)
           
protected  Script getGetGroupScript(java.lang.String objectId, java.util.List attrsToGet, java.util.Map options)
          Returns a script which will retrieve the attributes of a group account.
protected  GenericObject getGetUserResult(java.lang.String objectName, java.util.List attrsToGet, CaptureList captureList)
           
protected  Script getGetUserScript(java.lang.String objectId, java.util.List attrsToGet, java.util.Map options)
          Returns a script which will retrieve the attributes of a user account.
protected  java.util.ArrayList getListAllObjectsResult(java.lang.String objectType, CaptureList captureList)
          Analyzes the captrure list generated by executing the listAllObjects script on the scripted connection.
protected  Script getListAllObjectsScript(java.lang.String resObjType, java.util.Map options, java.lang.String runAsUser, EncryptedData runAsPassword)
          Returns a script which will return a list of objects of a specified type from the scriptedConnection.
protected  Script getLoginScript()
          Returns a script that will log the administrative user into the system and set up the shell if necessary.
protected  Script getLogoutScript()
          Returns a script that will log the administrative user out of the resource.
protected  java.lang.String getMutexAcquireScript(java.lang.String uidMutexFile, java.lang.String tmpUidMutexFile, java.lang.String pidFoundFile)
           
protected  java.lang.String getMutexReleaseScript(java.lang.String uidMutexFile)
           
protected  java.lang.String getNISDir()
           
protected  java.lang.String getNISNewGidScript()
           
protected  java.lang.String getNISNewUidScript()
           
protected  java.lang.String getNISPwddir()
           
protected  java.lang.Boolean getPwdAdmFlagAttrValue(WSUser user, java.lang.String mapName)
          Get the Boolean value of the specifed attribute based on the name from the right hand side of the schema map.
protected  java.util.ArrayList getReadOnlyTestCmds()
          Dynamic list of commands to test for permissions to execute.
protected  java.lang.String getRemoveGroupTmpFiles()
           
protected  java.lang.String getRemovePwdTmpFiles()
           
protected  java.util.ArrayList getRequiredGroupCmds()
          The list of required group commands for all unix adapters.
protected  java.util.ArrayList getRequiredNISCmds()
          The list of required file commands for all unix adapters.
protected  java.util.ArrayList getRequiredUserCmds()
          The list of required user commands for all unix adapters.
protected  WavesetResult getScanningResult(CaptureList captureList, java.util.Map args)
          Take the capured scanning result and from that build a report The script returns lines of name value pairs used to decribe the user and interesting attributes.
protected  Script getScanningScript(java.util.Map args)
          Generates a script that will return a list of all the users and interesting attributes for scanning.
protected  Script getShellsScript(Script script)
           
protected  WavesetResult getTestConnectionResult(CaptureList captureList)
          Evaluates capture list from execution of generic test connection script.
protected  Script getTestConnectionScript()
          Creates a script to test the connection, does NOT login or logout.
protected  java.lang.String getUid(WSUser user)
           
protected  Script getUpdateNativeGroupScript(GenericObject object)
          Returns a script which will update a native group.
protected  void getUpdateNativeUserResult(WSUser user, CaptureList captureList, WavesetResult result)
          Analyzes the capture list generated by executing the update user script on the scripted connection.
protected  Script getUpdateNativeUserScript(WSUser user, java.lang.String accountID, java.lang.String newName, java.lang.String password)
          Generates a script that will update an account for the passed user on the resource.
protected  Script getUpdateNISGroupScript(GenericObject object)
          Returns a script which will update a group.
protected  void getUpdateNISUserResult(WSUser user, CaptureList captureList, WavesetResult result)
          Analyzes the capture list generated by executing the update user script on the scripted connection.
protected  Script getUpdateNISUserScript(WSUser user, java.lang.String accountID, java.lang.String newName, java.lang.String password)
           
protected  WavesetResult getUpdateUserResult(GenericObject object, CaptureList captureList)
           
protected  void getUpdateUserResult(WSUser user, CaptureList captureList, WavesetResult result)
          Analyzes the capture list generated by executing the update user script on the scripted connection.
protected  Script getUpdateUserScript(GenericObject object)
          Returns a script which will update a user.
protected  Script getUpdateUserScript(java.lang.String accountId, java.lang.String password)
          Returns a script which will update a user.
protected  WSUser getUserResult(CaptureList captureList, WSUser targetUser)
          Analyzes the capture list generated by executing the get user script on the scripted connection.
protected  Script getUserScript(WSUser user)
          Returns a script that sends commands to check for existence of the passed user on the resource.
protected  java.lang.String getWhichScript(java.util.ArrayList req)
          Returns the actual which command statement used to send to the resource to determine the existance of the required commands.
protected  void handleUnsetPwdAttr(WSUser user, java.lang.String mapName)
           
protected  boolean isAllowableUserAttribute(java.lang.String name)
          Reports whether a given attribute name is legal on the resource.
protected  java.lang.String removeInitialSpace(java.lang.String s)
          Utility method returns a string with initial spaces stripped.
protected  void setPwdAdmAttrs(WSUser user, java.lang.String pwdadmOut)
           
protected  void startConnection()
          Starts a scripted connection up and logs into it.
static Resource staticCreatePrototypeResource()
          Creates a resource based on the prototype xml.
 boolean supportsAccountDisable()
          Whether the resource can enable and disable accounts.
 boolean supportsResourceAccount()
          Returns true if the resource adapter supports modifications to the resource account.
 
Methods inherited from class com.waveset.adapter.UnixResourceAdapter
addActionScript, addResultItem, addScriptArguments, addSudoReset, addSudoStart, authenticate, createResourceAttr, divideString, escape, getAccountActionResult, getAccountActionScript, getAccountIterator, getAccountIterator, getActionResult, getActionScript, getCaptureItem, getCreateGroupResult, getCreateGroupScript, getCreateObjectResult, getCreateObjectScript, getCreateUserScript, getDeleteGroupScript, getDeleteObjectScript, getDeleteUserScript, getGetObjectResult, getGetObjectScript, getListObjectsResult, getListObjectsScript, getReadOnlyNISTestCmds, getRenameGroupResult, getRenameGroupScript, getRenameObjectResult, getRenameObjectScript, getRenameUserResult, getRenameUserScript, getRequiredCmds, getRequiredFileCmds, getResourceAccounts, getScriptedConnection, getTestConfigurationResult, getTestConfigurationScript, getUpdateGroupResult, getUpdateGroupScript, getUpdateObjectResult, getUpdateObjectScript, getUpdateUserScript, init, isNIS, quoteString, replaceSpaces, setWavesetPrompt, stopConnection, stopConnection, sudoAuthorization, supportsActions, supportsCaseInsensitiveAccountIds, supportsExcludedAccounts, testConnection
 
Methods inherited from class com.waveset.adapter.GenericScriptResourceAdapter
checkCreateAccount, checkDeleteAccount, checkUpdateAccount, constructUserAttributeParameters, constructUserAttributeParameters, createObject, deleteObject, getAccountAttributeFromMapName, getAccountAttributes, getCapture, getDeleteObjectResult, getObject, getUpdateUserResult, getUser, getWaitFor, getWaitForIgnoreCase, listAllObjects, listObjects, lookupAndRunAction, realCreate, realDelete, realDisable, realEnable, realUpdate, renameObject, reverseMapAttr, reverseMapAttr, reverseMapMultiAttr, run, runAction, runAction, runAfterAction, runBeforeAction, scan, testConfiguration, updateObject, updateResourceAccount, wellFormedUserAttributeName
 
Methods inherited from class com.waveset.adapter.ResourceAdapterBase
checkForNoPasswordInSchema, checkSyntax, createAccount, createAccounts, createIdentity, deleteAccount, deleteAccount, deleteAccounts, disableAccount, disableAccounts, dnsEqual, dnsEqual, enableAccount, enableAccounts, executeResourceAttributeJavascriptAction, fillInResourceInfo, fillInResourceInfo, getAccountIterator, getAction, getActionNotFoundErrorMessage, getActionNotFoundMessage, getActionRunAsPassword, getActionRunAsUser, getActionTimeout, getActionType, getAdapter, getAdapter, getAdapter, getAdapterProxy, getAdapterProxy, getAllAccounts, getAttrNameFromMapName, getAttrNameFromMapName, getAttrParse, getAttrTypeFromMapName, getAttrTypeFromMapName, getAUserName, getBaseContextAttrName, getBaseContextObject, getBaseContexts, getBlockSize, getContext, getExcludedAccountsRule, getIdentity, getListAllObjectsAttrParse, getListUserAttrParse, getListUserGroupsAttrParse, getOptionalBooleanResAttrVal, getOptionalBooleanResAttrVal, getOptionalEncryptedResAttrVal, getOptionalResAttrVal, getOptionalStringResAttrVal, getRequiredResAttr, getRequiredResAttr, getRequiredResAttrVal, getRequiredResAttrVal, getRequiredResAttrVals, getRequiredUserAttributeNames, getResAttrValActionOnUser, getResAttrVals, getResource, getResourceInfo, getResourceObjectAttrValNameAttr, getResourceObjectClassAttr, getResourceObjectTypePrefix, getSchemaMap, getUser, getWSAttrByMapName, getWSAttrByMapName, getWSAttrFromMap, handleActionResult, handleJavascriptActionResult, isAccountAttributeSecret, isExcludedAccount, isExcludedAccount, isFeatureEnabled, isSupported, isTestMode, listAllObjects, listObjects, listObjectsOfType, lookupAction, lookupAction, lookupActions, namesEqual, objectClassesMatchType, println, restoreResourceObjectClassAttr, run, runResourceAttributeJavascriptAction, setCache, setContext, setDisabled, setFromResource, setResource, setResourceObjectClassAttr, setResourceOptionAttrs, startConnectionWrapper, supportsAccountActions, supportsContainerObjectTypes, supportsScanning, updateAccount, updateAccounts, updateResourceIdentity, vmStoreBoot, vmStoreGet, vmStoreInit, vmStoreLatch, vmStorePut
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.waveset.adapter.ResourceAdapter
checkCreateAccount, checkDeleteAccount, checkUpdateAccount, createAccount, createAccounts, createIdentity, createObject, deleteAccount, deleteAccount, deleteAccounts, deleteObject, disableAccount, disableAccounts, enableAccount, enableAccounts, getAccountAttributes, getAccountIterator, getAllAccounts, getBaseContextAttrName, getBaseContextObject, getBaseContexts, getObject, getResource, getUser, getUser, isSupported, listAllObjects, listAllObjects, listObjects, listObjects, listObjectsOfType, namesEqual, run, run, scan, setCache, setContext, setResource, setResourceObjectClassAttr, supportsContainerObjectTypes, supportsScanning, testConfiguration, updateAccount, updateAccounts, updateObject, updateResourceAccount
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values

RA_IS_ADMIN_USER

public static final java.lang.String RA_IS_ADMIN_USER
See Also:
Constant Field Values

RA_RM_USER_FROM_ETC_SECURITY

public static final java.lang.String RA_RM_USER_FROM_ETC_SECURITY
See Also:
Constant Field Values

ATTR_GROUP

public static final java.lang.String ATTR_GROUP
See Also:
Constant Field Values

ATTR_SHELL

public static final java.lang.String ATTR_SHELL
See Also:
Constant Field Values

ATTR_HOME

public static final java.lang.String ATTR_HOME
See Also:
Constant Field Values

ATTR_COMMENT

public static final java.lang.String ATTR_COMMENT
See Also:
Constant Field Values

ATTR_PWD_NOCHECK

public static final java.lang.String ATTR_PWD_NOCHECK
See Also:
Constant Field Values

ATTR_PWD_ADMIN

public static final java.lang.String ATTR_PWD_ADMIN
See Also:
Constant Field Values

ATTR_PWD_ADMCHG

public static final java.lang.String ATTR_PWD_ADMCHG
See Also:
Constant Field Values

LOGIN_USER

public static final java.lang.String LOGIN_USER
See Also:
Constant Field Values

LOGIN_PASSWORD

public static final java.lang.String LOGIN_PASSWORD
See Also:
Constant Field Values

DISPLAY_USER

public static final java.lang.String DISPLAY_USER
See Also:
Constant Field Values

DISPLAY_PASSWORD

public static final java.lang.String DISPLAY_PASSWORD
See Also:
Constant Field Values

RESOURCE_NAME

public static final java.lang.String RESOURCE_NAME
See Also:
Constant Field Values

RESOURCE_USER_FORM

public static final java.lang.String RESOURCE_USER_FORM
See Also:
Constant Field Values

isAdminUser

protected boolean isAdminUser

rmUserFlag

protected java.lang.String rmUserFlag

allowedNISAttributes

protected static java.util.Map allowedNISAttributes

DEFAULT_SHELL

protected static final java.lang.String DEFAULT_SHELL
See Also:
Constant Field Values

pwdMutexFile

protected java.lang.String pwdMutexFile

tmpPwdMutexFile

protected java.lang.String tmpPwdMutexFile

pwdPidFile

protected java.lang.String pwdPidFile

grpMutexFile

protected java.lang.String grpMutexFile

tmpGrpMutexFile

protected java.lang.String tmpGrpMutexFile

grpPidFile

protected java.lang.String grpPidFile

CMD_CHSEC

protected static final java.lang.String CMD_CHSEC
See Also:
Constant Field Values

CMD_LSSEC

protected static final java.lang.String CMD_LSSEC
See Also:
Constant Field Values

CMD_MKUSER

protected static final java.lang.String CMD_MKUSER
See Also:
Constant Field Values

CMD_CHUSER

protected static final java.lang.String CMD_CHUSER
See Also:
Constant Field Values

CMD_RMUSER

protected static final java.lang.String CMD_RMUSER
See Also:
Constant Field Values

CMD_PWUSER

protected static final java.lang.String CMD_PWUSER
See Also:
Constant Field Values

CMD_LSUSER

protected static final java.lang.String CMD_LSUSER
See Also:
Constant Field Values

CMD_PASSWD

protected static final java.lang.String CMD_PASSWD
See Also:
Constant Field Values

CMD_MKGROUP

protected static final java.lang.String CMD_MKGROUP
See Also:
Constant Field Values

CMD_CHGROUP

protected static final java.lang.String CMD_CHGROUP
See Also:
Constant Field Values

CMD_RMGROUP

protected static final java.lang.String CMD_RMGROUP
See Also:
Constant Field Values

CMD_CHGRPMEM

protected static final java.lang.String CMD_CHGRPMEM
See Also:
Constant Field Values

DEFAULT_SHELLS

public static final java.lang.String[] DEFAULT_SHELLS
Constructor Detail

AIXResourceAdapter

public AIXResourceAdapter()
No argument constructor.


AIXResourceAdapter

public AIXResourceAdapter(Resource res,
                          ObjectCache cache)
Constructor

Method Detail

staticCreatePrototypeResource

public static Resource staticCreatePrototypeResource()
                                              throws WavesetException
Creates a resource based on the prototype xml.

Throws:
WavesetException

constructUserAttributeParameter

protected java.lang.String constructUserAttributeParameter(java.lang.String key,
                                                           java.lang.String value)
Builds up a single user attribute value suitable for the chuser command, given the parameter key and value.

Specified by:
constructUserAttributeParameter in class GenericScriptResourceAdapter
Parameters:
key - - the attribute name.
value - - the attribute value name.

createPrototypeResource

public Resource createPrototypeResource()
                                 throws WavesetException
Non-static version of staticCreatePrototypeResource()

Specified by:
createPrototypeResource in interface ResourceAdapter
Specified by:
createPrototypeResource in class ResourceAdapterBase
Throws:
WavesetException

constructNISUserAttributeParameters

protected java.util.Map constructNISUserAttributeParameters(WSUser user,
                                                            java.util.Map allowedAttributes)

getNISPwddir

protected java.lang.String getNISPwddir()

getNISDir

protected java.lang.String getNISDir()
                              throws WavesetException
Throws:
WavesetException

addNISMake

protected void addNISMake(java.lang.String target,
                          Script script)
                   throws WavesetException
Throws:
WavesetException

addNISPasswordUpdate

protected void addNISPasswordUpdate(java.lang.String account,
                                    java.lang.String password,
                                    Script script)

addNISShellUpdate

protected void addNISShellUpdate(java.lang.String account,
                                 java.lang.String shell,
                                 Script script)

getNISNewUidScript

protected java.lang.String getNISNewUidScript()
                                       throws WavesetException
Throws:
WavesetException

getNISNewGidScript

protected java.lang.String getNISNewGidScript()
                                       throws WavesetException
Throws:
WavesetException

getAccountIteratorResult

protected AccountIterator getAccountIteratorResult(CaptureList captureList)
                                            throws WavesetException
Generates an account iterator from the capture list that was built from running the getAccountIteratorScript generated script through the ScriptedConnection.

Specified by:
getAccountIteratorResult in class GenericScriptResourceAdapter
Throws:
WavesetException

getBlockAccountIteratorScript

protected Script getBlockAccountIteratorScript(long timeout,
                                               boolean hasTimeout)
Returns a script that can be run on an opened and logged in ScriptedConnection to pull a list of users out of the system.


getAccountIteratorScript

protected Script getAccountIteratorScript(long timeout,
                                          boolean hasTimeout)
                                   throws WavesetException
Returns a script that can be run on an opened and logged in ScriptedConnection to pull a list of users out of the system.

Throws:
WavesetException

getAccountIteratorScript

protected Script getAccountIteratorScript()
                                   throws WavesetException
Description copied from class: GenericScriptResourceAdapter
Returns a script that can be run on an opened and logged in ScriptedConnection to pull a list of users out of the system. Needs to be defined in the derived class to send a command that will cause a list of users to be emitted, and to capture that list for parsing in getAccountIteratorResult. Should NOT send login or logout commands.

Specified by:
getAccountIteratorScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getAccountIteratorScript

protected Script getAccountIteratorScript(long timeout)
                                   throws WavesetException
Overrides:
getAccountIteratorScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getListAllObjectsScript

protected Script getListAllObjectsScript(java.lang.String resObjType,
                                         java.util.Map options,
                                         java.lang.String runAsUser,
                                         EncryptedData runAsPassword)
                                  throws WavesetException
Returns a script which will return a list of objects of a specified type from the scriptedConnection. This script should login as the username and password, if specified, or login as the authoritative account.

Overrides:
getListAllObjectsScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getListAllObjectsResult

protected java.util.ArrayList getListAllObjectsResult(java.lang.String objectType,
                                                      CaptureList captureList)
                                               throws WavesetException
Description copied from class: GenericScriptResourceAdapter
Analyzes the captrure list generated by executing the listAllObjects script on the scripted connection. Throws if the capture list indicates failure. The executing script may throw on failure also.

Overrides:
getListAllObjectsResult in class GenericScriptResourceAdapter
Throws:
WavesetException

getGetGroupScript

protected Script getGetGroupScript(java.lang.String objectId,
                                   java.util.List attrsToGet,
                                   java.util.Map options)
                            throws WavesetException
Returns a script which will retrieve the attributes of a group account.

Overrides:
getGetGroupScript in class UnixResourceAdapter
Throws:
WavesetException

getGetUserScript

protected Script getGetUserScript(java.lang.String objectId,
                                  java.util.List attrsToGet,
                                  java.util.Map options)
                           throws WavesetException
Returns a script which will retrieve the attributes of a user account.

Overrides:
getGetUserScript in class UnixResourceAdapter
Throws:
WavesetException

getGetUserResult

protected GenericObject getGetUserResult(java.lang.String objectName,
                                         java.util.List attrsToGet,
                                         CaptureList captureList)
                                  throws WavesetException
Overrides:
getGetUserResult in class UnixResourceAdapter
Throws:
WavesetException

getGetGroupResult

protected GenericObject getGetGroupResult(java.lang.String objectName,
                                          java.util.List attrsToGet,
                                          CaptureList captureList)
                                   throws WavesetException
Overrides:
getGetGroupResult in class UnixResourceAdapter
Throws:
WavesetException

getAuthenticateResult

protected WavesetResult getAuthenticateResult(java.util.HashMap loginInfo,
                                              CaptureList captureList)
                                       throws WavesetException
Takes the capture list from running the authenticate script through the resource and validates it. Throws if it is invalid.

Specified by:
getAuthenticateResult in class GenericScriptResourceAdapter
Throws:
WavesetException

getAuthenticateScript

protected Script getAuthenticateScript(java.util.HashMap loginInfo)
                                throws WavesetException
Generates a script for authenticating a user on the resource using the username and password in the loginInfo HashMap. Should NOT login or logout.

Specified by:
getAuthenticateScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getCheckCreateAccountResult

protected WavesetResult getCheckCreateAccountResult(CaptureList captureList)
                                             throws WavesetException
Validates the capture list returned from the check create account script execution. Returns a result if create account is likely to succeed, otherwise throws. The executing script may also throw if check fails.

Specified by:
getCheckCreateAccountResult in class GenericScriptResourceAdapter
Throws:
WavesetException

getCheckCreateAccountScript

protected Script getCheckCreateAccountScript()
                                      throws WavesetException
Returns a shell script to check the resource and determine if a create account request is likely to succeed. Running the script through the scripted connection may cause a failure and throw, or evaluating the resulting capture list may result in a throw. The script should NOT login or logout.

Specified by:
getCheckCreateAccountScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getCheckDeleteAccountResult

protected WavesetResult getCheckDeleteAccountResult(CaptureList captureList)
                                             throws WavesetException
Validates the capture list returned from the delete create account script execution. Returns a result if delete account is likely to succeed, otherwise throws. The executing script may also throw if check fails.

Specified by:
getCheckDeleteAccountResult in class GenericScriptResourceAdapter
Throws:
WavesetException

getCheckDeleteAccountScript

protected Script getCheckDeleteAccountScript()
                                      throws WavesetException
Returns a shell script to check the resource and determine if a delete account request is likely to succeed. Running the script through the scripted connection may cause a failure and throw, or evaluating the resulting capture list may result in a throw. The script should NOT login or logout.

Specified by:
getCheckDeleteAccountScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getCheckUpdateAccountResult

protected WavesetResult getCheckUpdateAccountResult(CaptureList captureList)
                                             throws WavesetException
Validates the capture list returned from the check update account script execution. Returns a result if update account is likely to succeed, otherwise throws. The executing script may also throw if check fails.

Specified by:
getCheckUpdateAccountResult in class GenericScriptResourceAdapter
Throws:
WavesetException

getCheckUpdateAccountScript

protected Script getCheckUpdateAccountScript()
                                      throws WavesetException
Returns a shell script to check the resource and determine if an update account request is likely to succeed. Running the script through the scripted connection may cause a failure and throw, or evaluating the resulting capture list may result in a throw. The script should NOT login or logout.

Specified by:
getCheckUpdateAccountScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getConnectionType

protected java.lang.String getConnectionType()
                                      throws WavesetException
Returns the scripted connection type of the resource.

Overrides:
getConnectionType in class UnixResourceAdapter
Throws:
WavesetException

getCreateUserResult

protected void getCreateUserResult(CaptureList captureList,
                                   WavesetResult result)
                            throws WavesetException
Analyzes the capture list generated by executing the create user script on the scripted connection. Throws if the capture list indicates failure. The executing script may throw on failure also.

Specified by:
getCreateUserResult in class GenericScriptResourceAdapter
Throws:
WavesetException

getCreateUserResult

protected WavesetResult getCreateUserResult(CaptureList captureList)
                                     throws WavesetException
Overrides:
getCreateUserResult in class UnixResourceAdapter
Throws:
WavesetException

getCreateNativeUserScript

protected Script getCreateNativeUserScript(WSUser user,
                                           java.lang.String accountID,
                                           java.lang.String password)
                                    throws WavesetException
Generates a script that will create an account for the passed user on the resource. The script can be executed on a ScriptedConnection. Should NOT login or logout.

Overrides:
getCreateNativeUserScript in class UnixResourceAdapter
Throws:
WavesetException

getCreateNISUserScript

protected Script getCreateNISUserScript(WSUser user,
                                        java.lang.String accountID,
                                        java.lang.String password)
                                 throws WavesetException
Overrides:
getCreateNISUserScript in class UnixResourceAdapter
Throws:
WavesetException

getCreateUserScript

protected Script getCreateUserScript(java.lang.String userName,
                                     GenericObject attrs,
                                     java.util.Map options,
                                     boolean isSaveAs)
                              throws WavesetException
Generates a script that will create a user account on the resource. The script can be executed on a ScriptedConnection. Should NOT login or logout.

Overrides:
getCreateUserScript in class UnixResourceAdapter
Throws:
WavesetException

getDeleteUserScript

protected Script getDeleteUserScript(GenericObject object,
                                     java.util.Map options)
                              throws WavesetException
Generates a script that will delete a user account on the resource. The script can be executed on a ScriptedConnection. Should NOT login or logout.

Overrides:
getDeleteUserScript in class UnixResourceAdapter
Throws:
WavesetException

getCreateNativeGroupScript

protected Script getCreateNativeGroupScript(java.lang.String groupName,
                                            GenericObject attrs,
                                            java.util.Map options,
                                            boolean isSaveAs)
                                     throws WavesetException
Generates a script that will create a group on the resource. The script can be executed on a ScriptedConnection. Should NOT login or logout.

Overrides:
getCreateNativeGroupScript in class UnixResourceAdapter
Throws:
WavesetException

getCreateNISGroupScript

protected Script getCreateNISGroupScript(java.lang.String groupName,
                                         GenericObject attrs,
                                         java.util.Map options,
                                         boolean isSaveAs)
                                  throws WavesetException
Overrides:
getCreateNISGroupScript in class UnixResourceAdapter
Throws:
WavesetException

getDeleteNativeGroupScript

protected Script getDeleteNativeGroupScript(GenericObject object,
                                            java.util.Map options)
                                     throws WavesetException
Generates a script that will delete a group on the resource. The script can be executed on a ScriptedConnection. Should NOT login or logout.

Overrides:
getDeleteNativeGroupScript in class UnixResourceAdapter
Throws:
WavesetException

getDeleteNISGroupScript

protected Script getDeleteNISGroupScript(GenericObject object,
                                         java.util.Map options)
                                  throws WavesetException
Overrides:
getDeleteNISGroupScript in class UnixResourceAdapter
Throws:
WavesetException

addPwdAdmCmd

protected void addPwdAdmCmd(WSUser user,
                            Script script)
                     throws WavesetException
Add the pwdadm command to the script.

Throws:
WavesetException

addPwdAdmFlag

protected void addPwdAdmFlag(WSUser user,
                             java.lang.String mapName,
                             java.lang.String flagName,
                             java.lang.StringBuffer buf)
Get the value of the specified attr and add the corresponding pwdadm flag if the attr's value is true.


addPwdAdmFlag

protected void addPwdAdmFlag(java.lang.String flagName,
                             java.lang.Boolean value,
                             java.lang.StringBuffer buf)
If the value is not null and true, then add it to the buffer.


getPwdAdmFlagAttrValue

protected java.lang.Boolean getPwdAdmFlagAttrValue(WSUser user,
                                                   java.lang.String mapName)
Get the Boolean value of the specifed attribute based on the name from the right hand side of the schema map.


addUid

protected java.lang.String addUid(WSUser user,
                                  java.lang.String userAttrParms)

getUid

protected java.lang.String getUid(WSUser user)

getDeleteUserResult

protected void getDeleteUserResult(CaptureList captureList)
                            throws WavesetException
Analyzes the capture list generated by executing the delete user script on the scripted connection. Throws if the capture list indicates failure. The executing script may throw on failure also.

Specified by:
getDeleteUserResult in class GenericScriptResourceAdapter
Throws:
WavesetException

getDeleteNativeUserScript

protected Script getDeleteNativeUserScript(WSUser user,
                                           java.lang.String accountID)
                                    throws WavesetException
Generates a script that will delete the account of the passed user on the resource. The script can be executed on a ScriptedConnection. Should NOT login or logout.

Overrides:
getDeleteNativeUserScript in class UnixResourceAdapter
Throws:
WavesetException

getDeleteNativeUserScript

protected Script getDeleteNativeUserScript(java.lang.String accountID)
                                    throws WavesetException
Generates a script that will delete the account of the passed user on the resource. The script can be executed on a ScriptedConnection. Should NOT login or logout.

Throws:
WavesetException

getDeleteNISUserScript

protected Script getDeleteNISUserScript(WSUser user,
                                        java.lang.String accountID)
                                 throws WavesetException
Generates a script that will delete the account of the passed user on the resource. The script can be executed on a ScriptedConnection. Should NOT login or logout.

Overrides:
getDeleteNISUserScript in class UnixResourceAdapter
Throws:
WavesetException

getDisableUserResult

protected boolean getDisableUserResult(CaptureList captureList)
                                throws WavesetException
Analyzes the capture list generated by executing the disable user script on the scripted connection. Throws if the capture list indicates failure. The executing script may throw on failure also.

Specified by:
getDisableUserResult in class GenericScriptResourceAdapter
Throws:
WavesetException

getDisableUserScript

protected Script getDisableUserScript(WSUser user,
                                      java.lang.String password)
                               throws WavesetException
Generates a script that will disable an account for the passed user on the resource. The script can be executed on a ScriptedConnection. Should NOT login or logout.

Specified by:
getDisableUserScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getEnableUserResult

protected boolean getEnableUserResult(CaptureList captureList)
                               throws WavesetException
Analyzes the capture list generated by executing the enable user script on the scripted connection. Throws if the capture list indicates failure. The executing script may throw on failure also.

Specified by:
getEnableUserResult in class GenericScriptResourceAdapter
Throws:
WavesetException

getEnableUserScript

protected Script getEnableUserScript(WSUser user,
                                     java.lang.String password)
                              throws WavesetException
Generates a script that will enable an account for the passed user on the resource. The script can be executed on a ScriptedConnection. Should NOT login or logout.

Specified by:
getEnableUserScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getLoginScript

protected Script getLoginScript()
                         throws WavesetException
Returns a script that will log the administrative user into the system and set up the shell if necessary.

Specified by:
getLoginScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getLogoutScript

protected Script getLogoutScript()
                          throws WavesetException
Returns a script that will log the administrative user out of the resource.

Specified by:
getLogoutScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getTestConnectionResult

protected WavesetResult getTestConnectionResult(CaptureList captureList)
                                         throws WavesetException
Evaluates capture list from execution of generic test connection script.

Throws:
WavesetException

getTestConnectionScript

protected Script getTestConnectionScript()
                                  throws WavesetException
Creates a script to test the connection, does NOT login or logout.

Throws:
WavesetException

getConnectionTestResult

protected WavesetResult getConnectionTestResult(CaptureList captureList)
                                         throws WavesetException
Evaluates capture list from execution of generic test connection script.

Specified by:
getConnectionTestResult in class UnixResourceAdapter
Throws:
WavesetException

getConnectionTestScript

protected Script getConnectionTestScript()
                                  throws WavesetException
Creates a script to test the connection, does NOT login or logout.

Specified by:
getConnectionTestScript in class UnixResourceAdapter
Throws:
WavesetException

getUpdateUserResult

protected void getUpdateUserResult(WSUser user,
                                   CaptureList captureList,
                                   WavesetResult result)
                            throws WavesetException
Analyzes the capture list generated by executing the update user script on the scripted connection. Throws if the capture list indicates failure. The executing script may throw on failure also.

Specified by:
getUpdateUserResult in class GenericScriptResourceAdapter
Throws:
WavesetException

getUpdateNativeUserResult

protected void getUpdateNativeUserResult(WSUser user,
                                         CaptureList captureList,
                                         WavesetResult result)
                                  throws WavesetException
Analyzes the capture list generated by executing the update user script on the scripted connection. Throws if the capture list indicates failure. The executing script may throw on failure also.

Throws:
WavesetException

getUpdateNISUserResult

protected void getUpdateNISUserResult(WSUser user,
                                      CaptureList captureList,
                                      WavesetResult result)
                               throws WavesetException
Analyzes the capture list generated by executing the update user script on the scripted connection. Throws if the capture list indicates failure. The executing script may throw on failure also.

Throws:
WavesetException

getUpdateUserResult

protected WavesetResult getUpdateUserResult(GenericObject object,
                                            CaptureList captureList)
                                     throws WavesetException
Overrides:
getUpdateUserResult in class UnixResourceAdapter
Throws:
WavesetException

badGroupsMessage

protected void badGroupsMessage(java.lang.String badGroups,
                                WavesetResult result)

getUpdateNativeUserScript

protected Script getUpdateNativeUserScript(WSUser user,
                                           java.lang.String accountID,
                                           java.lang.String newName,
                                           java.lang.String password)
                                    throws WavesetException
Generates a script that will update an account for the passed user on the resource. The script can be executed on a ScriptedConnection. Should NOT login or logout.

Overrides:
getUpdateNativeUserScript in class UnixResourceAdapter
Throws:
WavesetException

getUpdateNISUserScript

protected Script getUpdateNISUserScript(WSUser user,
                                        java.lang.String accountID,
                                        java.lang.String newName,
                                        java.lang.String password)
                                 throws WavesetException
Overrides:
getUpdateNISUserScript in class UnixResourceAdapter
Throws:
WavesetException

addUpdatePwdAdmCmd

protected void addUpdatePwdAdmCmd(WSUser user,
                                  Script script)
                           throws WavesetException
Adds commands to the script to set the pwdadm flags appropriately.

Throws:
WavesetException

filterPwdAdmFlag

protected void filterPwdAdmFlag(java.lang.Boolean value,
                                java.lang.String flagName,
                                Script script)
Remove the flag from WSADMOUT if the corresponding attribute value is false.


checkGroups

protected void checkGroups(WSUser user,
                           Script script)
                    throws WavesetException
Add commands to the script that will check to see which groups exist and only attempt to add the user to those groups that exist. Generate and echo a list of groups that do not exist, so that a message can be displayed indicating this.

Throws:
WavesetException

getUserResult

protected WSUser getUserResult(CaptureList captureList,
                               WSUser targetUser)
                        throws WavesetException
Analyzes the capture list generated by executing the get user script on the scripted connection. Returns null if the capture list indicates failure. Otherwise returns the new user. Should probably be called getGetUserResult for consistency, but that would look funny.

Specified by:
getUserResult in class GenericScriptResourceAdapter
Throws:
WavesetException

getUpdateUserScript

protected Script getUpdateUserScript(GenericObject object)
                              throws WavesetException
Returns a script which will update a user.

Overrides:
getUpdateUserScript in class UnixResourceAdapter
Throws:
WavesetException

getUpdateUserScript

protected Script getUpdateUserScript(java.lang.String accountId,
                                     java.lang.String password)
                              throws WavesetException
Returns a script which will update a user.

Overrides:
getUpdateUserScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getUpdateNativeGroupScript

protected Script getUpdateNativeGroupScript(GenericObject object)
                                     throws WavesetException
Returns a script which will update a native group.

Overrides:
getUpdateNativeGroupScript in class UnixResourceAdapter
Throws:
WavesetException

getUpdateNISGroupScript

protected Script getUpdateNISGroupScript(GenericObject object)
                                  throws WavesetException
Description copied from class: UnixResourceAdapter
Returns a script which will update a group.

Overrides:
getUpdateNISGroupScript in class UnixResourceAdapter
Throws:
WavesetException

setPwdAdmAttrs

protected void setPwdAdmAttrs(WSUser user,
                              java.lang.String pwdadmOut)

addPwdAdmAttr

protected void addPwdAdmAttr(WSUser user,
                             java.lang.StringBuffer buf)

handleUnsetPwdAttr

protected void handleUnsetPwdAttr(WSUser user,
                                  java.lang.String mapName)

getUserScript

protected Script getUserScript(WSUser user)
                        throws WavesetException
Returns a script that sends commands to check for existence of the passed user on the resource. Upon execution, captures necessary text for analysis by getUserResult method.

Specified by:
getUserScript in class GenericScriptResourceAdapter
Throws:
WavesetException

removeInitialSpace

protected java.lang.String removeInitialSpace(java.lang.String s)
Utility method returns a string with initial spaces stripped.


isAllowableUserAttribute

protected boolean isAllowableUserAttribute(java.lang.String name)
Reports whether a given attribute name is legal on the resource.

Specified by:
isAllowableUserAttribute in class GenericScriptResourceAdapter

startConnection

protected void startConnection()
                        throws WavesetException
Starts a scripted connection up and logs into it.

Overrides:
startConnection in class UnixResourceAdapter
Throws:
WavesetException

supportsAccountDisable

public boolean supportsAccountDisable()
Whether the resource can enable and disable accounts.

Specified by:
supportsAccountDisable in interface ResourceAdapter
Overrides:
supportsAccountDisable in class ResourceAdapterBase

supportsResourceAccount

public boolean supportsResourceAccount()
Description copied from class: ResourceAdapterBase
Returns true if the resource adapter supports modifications to the resource account.

Specified by:
supportsResourceAccount in interface ResourceAdapter
Overrides:
supportsResourceAccount in class ResourceAdapterBase

getFeatures

public GenericObject getFeatures()
Expose features supported by the Resource Adapter. Note: ActiveSync is considered a facet, not a feature.

Specified by:
getFeatures in interface ResourceAdapter
Overrides:
getFeatures in class GenericScriptResourceAdapter
Returns:
GenericObject containing Features, as both key and value, which are supported by this resource adapter.
See Also:
ResourceAdapter.Features

buildUser

protected WSUser buildUser(java.lang.String userStr,
                           WSUser targetUser)
                    throws WavesetException
Build a WSUser from the output of the "lsuser" command. The output is formatted like this: accountId key1=value1 key2=value two key3= key4=value4 ... In the example above, "3" does not have a value and "value two" contains a space. Note: the code assumes that keys will not contain spaces.

Throws:
WavesetException

changeNISGroupMembers

protected void changeNISGroupMembers(java.lang.String group,
                                     java.lang.String users,
                                     Script script)
                              throws WavesetException
Add commands to the script that will check to see which users exist. Only attempt to add the user that exist to the group. Generate and echo a list of users that do not exist, so that a message can be displayed indicating this. Note: Any checks on users need to be done prior to invoking this method.

Throws:
WavesetException

getMutexAcquireScript

protected java.lang.String getMutexAcquireScript(java.lang.String uidMutexFile,
                                                 java.lang.String tmpUidMutexFile,
                                                 java.lang.String pidFoundFile)

getMutexReleaseScript

protected java.lang.String getMutexReleaseScript(java.lang.String uidMutexFile)

getRemovePwdTmpFiles

protected java.lang.String getRemovePwdTmpFiles()

getRemoveGroupTmpFiles

protected java.lang.String getRemoveGroupTmpFiles()

getScanningScript

protected Script getScanningScript(java.util.Map args)
                            throws WavesetException
Description copied from class: GenericScriptResourceAdapter
Generates a script that will return a list of all the users and interesting attributes for scanning.

Resources which support scanning will have to implement both a genScanningScript and getScanningResult along the "_supportsScanning" attribute to true. ( in the prototype xml )

Overrides:
getScanningScript in class GenericScriptResourceAdapter
Throws:
WavesetException

getScanningResult

protected WavesetResult getScanningResult(CaptureList captureList,
                                          java.util.Map args)
                                   throws WavesetException
Take the capured scanning result and from that build a report The script returns lines of name value pairs used to decribe the user and interesting attributes. e.g. userName=bkennedy,time_last_login=997392775,lastupdate=997392724

Overrides:
getScanningResult in class GenericScriptResourceAdapter
Throws:
WavesetException

getWhichScript

protected java.lang.String getWhichScript(java.util.ArrayList req)
Description copied from class: UnixResourceAdapter
Returns the actual which command statement used to send to the resource to determine the existance of the required commands.

Overrides:
getWhichScript in class UnixResourceAdapter
Parameters:
req - List of required commands
Returns:
Single line execute script to determine the existance of the commands.

getRequiredGroupCmds

protected java.util.ArrayList getRequiredGroupCmds()
Description copied from class: UnixResourceAdapter
The list of required group commands for all unix adapters. Override this methods to add or remove commands for a particular adapter.

Overrides:
getRequiredGroupCmds in class UnixResourceAdapter
Returns:
Returns a list of require commands to create, update, and delete a group.

getRequiredUserCmds

protected java.util.ArrayList getRequiredUserCmds()
Description copied from class: UnixResourceAdapter
The list of required user commands for all unix adapters. Override this methods to add or remove commands for a particular adapter.

Overrides:
getRequiredUserCmds in class UnixResourceAdapter
Returns:
Returns a list of require commands to create, update, and delete a user.

getRequiredNISCmds

protected java.util.ArrayList getRequiredNISCmds()
Description copied from class: UnixResourceAdapter
The list of required file commands for all unix adapters. Override this methods to add or remove commands for a particular adapter.

Overrides:
getRequiredNISCmds in class UnixResourceAdapter
Returns:
Returns a list of require commands to perform operations on files within the resource.

getReadOnlyTestCmds

protected java.util.ArrayList getReadOnlyTestCmds()
Description copied from class: UnixResourceAdapter
Dynamic list of commands to test for permissions to execute.

Overrides:
getReadOnlyTestCmds in class UnixResourceAdapter

getDefaultShellsList

protected java.util.List getDefaultShellsList()
Overrides:
getDefaultShellsList in class UnixResourceAdapter

getShellsScript

protected Script getShellsScript(Script script)
Overrides:
getShellsScript in class UnixResourceAdapter