com.waveset.adapter
Class LinuxResourceAdapter

java.lang.Object
  extended bycom.waveset.adapter.ResourceAdapterBase
      extended bycom.waveset.adapter.GenericScriptResourceAdapter
          extended bycom.waveset.adapter.UnixResourceAdapter
              extended bycom.waveset.adapter.SVIDResourceAdapter
                  extended bycom.waveset.adapter.LinuxResourceAdapter
All Implemented Interfaces:
ResourceAdapter, ResourcePolicyTimeouts
Direct Known Subclasses:
RedHatLinuxResourceAdapter, SUSELinuxResourceAdapter

public abstract class LinuxResourceAdapter
extends SVIDResourceAdapter

Resource adapter for Linux The Linux usermod/useradd/userdel commands use flags (-u, -g, etc) to specify the user attributes. These flags have been mapped in a hashmap, see SVIDResourceAdapter.paramToFlagMap.


Nested Class Summary
protected  class LinuxResourceAdapter.AcctIter
          AccountIterator implementation that can be built by construction from the output of "cat /etc/passwd".
protected  class LinuxResourceAdapter.BlockAcctIter
          BlockAccountIterator implementation that can be built by construction from the list of users.
 
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.lang.String CMD_CHSH
           
protected static java.lang.String CMD_LASTLOG
           
static java.lang.String code_id
           
static java.lang.String[] DEFAULT_SHELLS
           
protected static java.lang.String NEWPWD_PROMPT
           
static java.lang.String RA_NISENCRYPTION
          Additional variables for NIS support on Linux.
protected static java.lang.String ROOTPWD_PROMPT
           
 
Fields inherited from class com.waveset.adapter.SVIDResourceAdapter
AA_LAST_LOGIN_TIME, DISPLAY_PASSWORD, DISPLAY_USER, grpMutexFile, grpPidFile, LOGIN_PASSWORD, LOGIN_USER, PASSWD_CLEAR, PASSWD_FORCE_CHANGE, PASSWD_LOCK, PASSWD_MAX, PASSWD_MIN, PASSWD_WARN, pwdMutexFile, pwdPidFile, RA_LOGIN_SHELL_PROMPT, RA_MAKE_DIR, RA_NISSHADOW, RA_ROOT_PASSWORD, RA_ROOT_SHELL_PROMPT, RA_ROOT_USER, RA_SKEL_DIR, RESOURCE_LOGIN_MODULE, RESOURCE_NAME, RESOURCE_USER_FORM, RESTYPE_DISPLAY_NAME, tmpGrpMutexFile, tmpPwdMutexFile, USER_AUTHORIZATION, USER_COMMENT, USER_DIR, USER_EXPIRE, USER_GROUP, USER_INACTIVE, USER_NEW_LOGNAME, USER_PROFILE, USER_ROLE, USER_SECONDARY_GROUP, USER_SHELL, USER_TIME_LAST_LOGIN, USER_UID
 
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_PASSWD, 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_NISDIR, RA_NISPWDDIR, RA_NISSRCDIR, 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
LinuxResourceAdapter()
          Constructor with empty param list.
LinuxResourceAdapter(Resource res, ObjectCache cache)
          Constructor with params.
 
Method Summary
protected  void addLastLogin(java.lang.String lastResult, WSUser user)
           
protected  void addNISMake(java.lang.String target, Script script)
           
protected  void addNISPasswordUpdate(java.lang.String account, java.lang.String password, Script script)
           
protected static void addNISResourceAttributes(Resource res)
           
protected  void addNISShellUpdate(java.lang.String account, java.lang.String shell, Script script)
           
protected  WSUser buildUser(java.lang.String loginsResult, java.lang.String groupResult, java.lang.String shadowResult, java.lang.String primaryGroup, java.lang.String lastResult, WSUser targetUser)
          Constructs and returns the user based on the outputs of the SVID commands logins, roles, profiles, and auths.
protected  WSUser buildUser(java.lang.String loginsResult, java.lang.String groupResult, java.lang.String shadowResult, java.lang.String primaryGroup, WSUser targetUser)
          Constructs and returns the user based on the outputs of the SVID commands logins, roles, profiles, and auths.
protected  WSUser buildUser(java.lang.String loginsResult, java.lang.String lastResult, WSUser targetUser)
           
protected  void changeGroupMembers(java.lang.String group, java.lang.String users, Script script)
          Add commands to the script that will check to see which users 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 shell commands, given the parameter key and value.
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  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)
           
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)
          Generates a script that will create an account for the passed user on the resource.
protected  java.util.List getDefaultShellsList()
           
protected  Script getDeleteNISGroupScript(GenericObject object, java.util.Map options)
           
protected  Script getDeleteNISUserScript(WSUser user, java.lang.String accountID)
           
protected  java.lang.String getGroupCreateGroupOpt()
           
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.
abstract  java.lang.String getLoginPasswordAttrName()
           
abstract  java.lang.String getLoginUserAttrName()
           
protected  java.lang.String getMutexAcquireScript(java.lang.String uidMutexFile, java.lang.String tmpUidMutexFile, java.lang.String pidFoundFile)
           
protected  Script getNativeUserScript(WSUser user, java.lang.String accountID)
          Returns a script that sends commands to check for existence of the passed user on the resource.
protected  java.lang.String getNISNewGidScript()
           
protected  java.lang.String getNISNewUidScript()
           
protected  Script getNISUserScript(WSUser user, java.lang.String accountID)
           
protected  java.util.ArrayList getReadOnlyTestCmds()
          Dynamic list of commands to test for permissions to execute.
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)
          Based on the result of the scan routine's capturelist and the arguments passed into the routine, generate some output.
protected  Script getScanningScript(java.util.Map scanArgs)
          Generates a script that will return a list of all the users and interesting attributes.
protected  Script getShellsScript(Script script)
          The default command that will return the shells from a Linux system.
protected  java.lang.String getUid(WSUser user)
          Ascertain the UID (user name) from the WSUser obj.
protected  Script getUpdateNativeUserScript(WSUser user, java.lang.String accountID, java.lang.String newName, java.lang.String password)
           
protected  Script getUpdateNISGroupScript(GenericObject object)
          Returns a script which will update a group.
protected  Script getUpdateNISUserScript(WSUser user, java.lang.String accountID, java.lang.String newName, java.lang.String password)
           
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  WSUser getUserResult(CaptureList captureList, WSUser targetUser)
          Analyzes the capture list generated by executing the get user script on the scripted connection.
protected  boolean isAllowableUserAttribute(java.lang.String name)
          Reports whether a given attribute name is legal on the resource.
protected  boolean loginMustUseTerm()
           
 
Methods inherited from class com.waveset.adapter.SVIDResourceAdapter
addAttributeIfMapped, constructUseraddParameters, constructUserPasswordParameters, createAcctAttrType, createPrototypeResource, getAuthenticateResult, getCheckCreateAccountResult, getCheckCreateAccountScript, getCheckDeleteAccountResult, getCheckDeleteAccountScript, getCheckUpdateAccountResult, getCheckUpdateAccountScript, getConnectionTestResult, getConnectionTestScript, getConnectionType, getCreateGroupResult, getCreateNativeGroupScript, getCreateUserResult, getDeleteNativeGroupScript, getDeleteNativeUserScript, getDeleteUserResult, getDisableUserResult, getDisableUserScript, getEnableUserResult, getEnableUserScript, getFeatures, getGetGroupResult, getGetGroupScript, getListAllObjectsResult, getLoginScript, getLogoutScript, getMutexReleaseScript, getNISDir, getNISPwddir, getNISUserResult, getRemoveGroupTmpFiles, getRemovePwdTmpFiles, getRenameGroupResult, getRenameGroupScript, getTestConnectionResult, getTestConnectionScript, getUpdateGroupResult, getUpdateNativeGroupScript, getUpdateUserScript, getUserScript, isNISShadow, startConnection, staticCreatePrototypeResource, supportsAccountDisable, supportsResourceAccount
 
Methods inherited from class com.waveset.adapter.UnixResourceAdapter
addActionScript, addResultItem, addScriptArguments, addSudoReset, addSudoStart, authenticate, createResourceAttr, divideString, escape, getAccountActionResult, getAccountActionScript, getAccountIterator, getAccountIterator, getActionResult, getActionScript, getCaptureItem, getCreateGroupScript, getCreateObjectResult, getCreateObjectScript, getCreateUserResult, getCreateUserScript, getCreateUserScript, getDeleteGroupScript, getDeleteObjectScript, getDeleteUserScript, getDeleteUserScript, getGetObjectResult, getGetObjectScript, getGetUserResult, getGetUserScript, getListObjectsResult, getListObjectsScript, getReadOnlyNISTestCmds, getRenameObjectResult, getRenameObjectScript, getRenameUserResult, getRenameUserScript, getRequiredCmds, getRequiredFileCmds, getRequiredGroupCmds, getResourceAccounts, getScriptedConnection, getTestConfigurationResult, getTestConfigurationScript, getUpdateGroupScript, getUpdateObjectResult, getUpdateObjectScript, getUpdateUserResult, getUpdateUserScript, getUpdateUserScript, getWhichScript, 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_NISENCRYPTION

public static final java.lang.String RA_NISENCRYPTION
Additional variables for NIS support on Linux.

See Also:
Constant Field Values

ROOTPWD_PROMPT

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

NEWPWD_PROMPT

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

CMD_CHSH

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

CMD_LASTLOG

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

DEFAULT_SHELLS

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

LinuxResourceAdapter

public LinuxResourceAdapter()
Constructor with empty param list.


LinuxResourceAdapter

public LinuxResourceAdapter(Resource res,
                            ObjectCache cache)
Constructor with params.

Method Detail

addNISResourceAttributes

protected static void addNISResourceAttributes(Resource res)
                                        throws WavesetException
Throws:
WavesetException

isAllowableUserAttribute

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

Overrides:
isAllowableUserAttribute in class SVIDResourceAdapter

getUid

protected java.lang.String getUid(WSUser user)
Ascertain the UID (user name) from the WSUser obj.

Returns:
A string representing the User ID.

constructUserAttributeParameter

protected java.lang.String constructUserAttributeParameter(java.lang.String key,
                                                           java.lang.String value)
Builds up a single user attribute value suitable for shell commands, given the parameter key and value. This is identical to the method found in SVIDResourceAdapter. The code is replicated here in order to use the private maps.

Overrides:
constructUserAttributeParameter in class SVIDResourceAdapter

constructNISUserAttributeParameters

protected java.util.Map constructNISUserAttributeParameters(WSUser user,
                                                            java.util.Map allowedAttributes)
Overrides:
constructNISUserAttributeParameters in class SVIDResourceAdapter

addNISPasswordUpdate

protected void addNISPasswordUpdate(java.lang.String account,
                                    java.lang.String password,
                                    Script script)
Overrides:
addNISPasswordUpdate in class SVIDResourceAdapter

addNISShellUpdate

protected void addNISShellUpdate(java.lang.String account,
                                 java.lang.String shell,
                                 Script script)
Overrides:
addNISShellUpdate in class SVIDResourceAdapter

getNISNewUidScript

protected java.lang.String getNISNewUidScript()
                                       throws WavesetException
Overrides:
getNISNewUidScript in class SVIDResourceAdapter
Throws:
WavesetException

getNISNewGidScript

protected java.lang.String getNISNewGidScript()
                                       throws WavesetException
Overrides:
getNISNewGidScript in class SVIDResourceAdapter
Throws:
WavesetException

addNISMake

protected void addNISMake(java.lang.String target,
                          Script script)
                   throws WavesetException
Overrides:
addNISMake in class SVIDResourceAdapter
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 SVIDResourceAdapter
Throws:
WavesetException

getCreateNISUserScript

protected Script getCreateNISUserScript(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:
getCreateNISUserScript in class SVIDResourceAdapter
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.

Overrides:
getUpdateUserResult in class SVIDResourceAdapter
Throws:
WavesetException

getUpdateNativeUserScript

protected Script getUpdateNativeUserScript(WSUser user,
                                           java.lang.String accountID,
                                           java.lang.String newName,
                                           java.lang.String password)
                                    throws WavesetException
Overrides:
getUpdateNativeUserScript in class SVIDResourceAdapter
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 SVIDResourceAdapter
Throws:
WavesetException

getDeleteNISUserScript

protected Script getDeleteNISUserScript(WSUser user,
                                        java.lang.String accountID)
                                 throws WavesetException
Overrides:
getDeleteNISUserScript in class SVIDResourceAdapter
Throws:
WavesetException

getCreateNISGroupScript

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

getUpdateNISGroupScript

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

Overrides:
getUpdateNISGroupScript in class SVIDResourceAdapter
Throws:
WavesetException

getDeleteNISGroupScript

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

changeGroupMembers

protected void changeGroupMembers(java.lang.String group,
                                  java.lang.String users,
                                  Script script)
                           throws WavesetException
Description copied from class: SVIDResourceAdapter
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.

Overrides:
changeGroupMembers in class SVIDResourceAdapter
Throws:
WavesetException

getBlockAccountIteratorScript

protected Script getBlockAccountIteratorScript(long timeout,
                                               boolean hasTimeout)
Overrides:
getBlockAccountIteratorScript in class SVIDResourceAdapter
Parameters:
timeout -
hasTimeout -
Returns:

getAccountIteratorScript

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

Overrides:
getAccountIteratorScript in class SVIDResourceAdapter
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.

Overrides:
getAccountIteratorScript in class SVIDResourceAdapter
Throws:
WavesetException

getAccountIteratorScript

protected Script getAccountIteratorScript(long timeout)
                                   throws WavesetException
Overrides:
getAccountIteratorScript in class SVIDResourceAdapter
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.

Overrides:
getAccountIteratorResult in class SVIDResourceAdapter
Throws:
WavesetException

getAuthenticateScript

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

Overrides:
getAuthenticateScript in class SVIDResourceAdapter
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 SVIDResourceAdapter
Throws:
WavesetException

getUserResult

protected WSUser getUserResult(CaptureList captureList,
                               WSUser targetUser)
                        throws WavesetException
Description copied from class: SVIDResourceAdapter
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.

Overrides:
getUserResult in class SVIDResourceAdapter
Throws:
WavesetException

getNativeUserScript

protected Script getNativeUserScript(WSUser user,
                                     java.lang.String accountID)
                              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.

Overrides:
getNativeUserScript in class SVIDResourceAdapter
Throws:
WavesetException

getNISUserScript

protected Script getNISUserScript(WSUser user,
                                  java.lang.String accountID)
                           throws WavesetException
Overrides:
getNISUserScript in class SVIDResourceAdapter
Throws:
WavesetException

buildUser

protected WSUser buildUser(java.lang.String loginsResult,
                           java.lang.String groupResult,
                           java.lang.String shadowResult,
                           java.lang.String primaryGroup,
                           WSUser targetUser)
                    throws WavesetException
Description copied from class: SVIDResourceAdapter
Constructs and returns the user based on the outputs of the SVID commands logins, roles, profiles, and auths.

Overrides:
buildUser in class SVIDResourceAdapter
Throws:
WavesetException

buildUser

protected WSUser buildUser(java.lang.String loginsResult,
                           java.lang.String groupResult,
                           java.lang.String shadowResult,
                           java.lang.String primaryGroup,
                           java.lang.String lastResult,
                           WSUser targetUser)
                    throws WavesetException
Description copied from class: SVIDResourceAdapter
Constructs and returns the user based on the outputs of the SVID commands logins, roles, profiles, and auths.

Overrides:
buildUser in class SVIDResourceAdapter
Throws:
WavesetException

buildUser

protected WSUser buildUser(java.lang.String loginsResult,
                           java.lang.String lastResult,
                           WSUser targetUser)
                    throws WavesetException
Overrides:
buildUser in class SVIDResourceAdapter
Throws:
WavesetException

addLastLogin

protected void addLastLogin(java.lang.String lastResult,
                            WSUser user)
Overrides:
addLastLogin in class SVIDResourceAdapter

getMutexAcquireScript

protected java.lang.String getMutexAcquireScript(java.lang.String uidMutexFile,
                                                 java.lang.String tmpUidMutexFile,
                                                 java.lang.String pidFoundFile)
Overrides:
getMutexAcquireScript in class SVIDResourceAdapter

getScanningScript

protected Script getScanningScript(java.util.Map scanArgs)
                            throws WavesetException
Generates a script that will return a list of all the users and interesting attributes.

Overrides:
getScanningScript in class SVIDResourceAdapter
Throws:
WavesetException

getScanningResult

protected WavesetResult getScanningResult(CaptureList captureList,
                                          java.util.Map args)
                                   throws WavesetException
Description copied from class: GenericScriptResourceAdapter
Based on the result of the scan routine's capturelist and the arguments passed into the routine, generate some output. You may or may not use the scanArgs in the processing of the results, it depends on what mechanisms are available on each resource.

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

Overrides:
getScanningResult in class SVIDResourceAdapter
Throws:
WavesetException

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.

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.

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)
The default command that will return the shells from a Linux system.

Overrides:
getShellsScript in class UnixResourceAdapter
Returns:
a String that is the command that will return a list of shells for a system.

getGroupCreateGroupOpt

protected java.lang.String getGroupCreateGroupOpt()

loginMustUseTerm

protected boolean loginMustUseTerm()

getLoginUserAttrName

public abstract java.lang.String getLoginUserAttrName()
Specified by:
getLoginUserAttrName in class SVIDResourceAdapter

getLoginPasswordAttrName

public abstract java.lang.String getLoginPasswordAttrName()
Specified by:
getLoginPasswordAttrName in class SVIDResourceAdapter