|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.adapter.ResourceAdapterBase
com.waveset.adapter.GenericScriptResourceAdapter
com.waveset.adapter.UnixResourceAdapter
com.waveset.adapter.SVIDResourceAdapter
com.waveset.adapter.LinuxResourceAdapter
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.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 |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String code_id
public static final java.lang.String RA_NISENCRYPTION
protected static final java.lang.String ROOTPWD_PROMPT
protected static final java.lang.String NEWPWD_PROMPT
protected static final java.lang.String CMD_CHSH
protected static final java.lang.String CMD_LASTLOG
public static final java.lang.String[] DEFAULT_SHELLS
Constructor Detail |
public LinuxResourceAdapter()
public LinuxResourceAdapter(Resource res, ObjectCache cache)
Method Detail |
protected static void addNISResourceAttributes(Resource res) throws WavesetException
WavesetException
protected boolean isAllowableUserAttribute(java.lang.String name)
isAllowableUserAttribute
in class SVIDResourceAdapter
protected java.lang.String getUid(WSUser user)
protected java.lang.String constructUserAttributeParameter(java.lang.String key, java.lang.String value)
constructUserAttributeParameter
in class SVIDResourceAdapter
protected java.util.Map constructNISUserAttributeParameters(WSUser user, java.util.Map allowedAttributes)
constructNISUserAttributeParameters
in class SVIDResourceAdapter
protected void addNISPasswordUpdate(java.lang.String account, java.lang.String password, Script script)
addNISPasswordUpdate
in class SVIDResourceAdapter
protected void addNISShellUpdate(java.lang.String account, java.lang.String shell, Script script)
addNISShellUpdate
in class SVIDResourceAdapter
protected java.lang.String getNISNewUidScript() throws WavesetException
getNISNewUidScript
in class SVIDResourceAdapter
WavesetException
protected java.lang.String getNISNewGidScript() throws WavesetException
getNISNewGidScript
in class SVIDResourceAdapter
WavesetException
protected void addNISMake(java.lang.String target, Script script) throws WavesetException
addNISMake
in class SVIDResourceAdapter
WavesetException
protected Script getCreateNativeUserScript(WSUser user, java.lang.String accountID, java.lang.String password) throws WavesetException
getCreateNativeUserScript
in class SVIDResourceAdapter
WavesetException
protected Script getCreateNISUserScript(WSUser user, java.lang.String accountID, java.lang.String password) throws WavesetException
getCreateNISUserScript
in class SVIDResourceAdapter
WavesetException
protected void getUpdateUserResult(WSUser user, CaptureList captureList, WavesetResult result) throws WavesetException
getUpdateUserResult
in class SVIDResourceAdapter
WavesetException
protected Script getUpdateNativeUserScript(WSUser user, java.lang.String accountID, java.lang.String newName, java.lang.String password) throws WavesetException
getUpdateNativeUserScript
in class SVIDResourceAdapter
WavesetException
protected Script getUpdateNISUserScript(WSUser user, java.lang.String accountID, java.lang.String newName, java.lang.String password) throws WavesetException
getUpdateNISUserScript
in class SVIDResourceAdapter
WavesetException
protected Script getDeleteNISUserScript(WSUser user, java.lang.String accountID) throws WavesetException
getDeleteNISUserScript
in class SVIDResourceAdapter
WavesetException
protected Script getCreateNISGroupScript(java.lang.String groupName, GenericObject attrs, java.util.Map options, boolean isSaveAs) throws WavesetException
getCreateNISGroupScript
in class SVIDResourceAdapter
WavesetException
protected Script getUpdateNISGroupScript(GenericObject object) throws WavesetException
getUpdateNISGroupScript
in class SVIDResourceAdapter
WavesetException
protected Script getDeleteNISGroupScript(GenericObject object, java.util.Map options) throws WavesetException
getDeleteNISGroupScript
in class SVIDResourceAdapter
WavesetException
protected void changeGroupMembers(java.lang.String group, java.lang.String users, Script script) throws WavesetException
SVIDResourceAdapter
changeGroupMembers
in class SVIDResourceAdapter
WavesetException
protected Script getBlockAccountIteratorScript(long timeout, boolean hasTimeout)
getBlockAccountIteratorScript
in class SVIDResourceAdapter
timeout
- hasTimeout
-
protected Script getAccountIteratorScript(long timeout, boolean hasTimeout) throws WavesetException
SVIDResourceAdapter
getAccountIteratorScript
in class SVIDResourceAdapter
WavesetException
protected Script getAccountIteratorScript() throws WavesetException
GenericScriptResourceAdapter
getAccountIteratorScript
in class SVIDResourceAdapter
WavesetException
protected Script getAccountIteratorScript(long timeout) throws WavesetException
getAccountIteratorScript
in class SVIDResourceAdapter
WavesetException
protected AccountIterator getAccountIteratorResult(CaptureList captureList) throws WavesetException
getAccountIteratorResult
in class SVIDResourceAdapter
WavesetException
protected Script getAuthenticateScript(java.util.HashMap loginInfo) throws WavesetException
SVIDResourceAdapter
getAuthenticateScript
in class SVIDResourceAdapter
WavesetException
protected Script getListAllObjectsScript(java.lang.String resObjType, java.util.Map options, java.lang.String runAsUser, EncryptedData runAsPassword) throws WavesetException
getListAllObjectsScript
in class SVIDResourceAdapter
WavesetException
protected WSUser getUserResult(CaptureList captureList, WSUser targetUser) throws WavesetException
SVIDResourceAdapter
getUserResult
in class SVIDResourceAdapter
WavesetException
protected Script getNativeUserScript(WSUser user, java.lang.String accountID) throws WavesetException
getNativeUserScript
in class SVIDResourceAdapter
WavesetException
protected Script getNISUserScript(WSUser user, java.lang.String accountID) throws WavesetException
getNISUserScript
in class SVIDResourceAdapter
WavesetException
protected WSUser buildUser(java.lang.String loginsResult, java.lang.String groupResult, java.lang.String shadowResult, java.lang.String primaryGroup, WSUser targetUser) throws WavesetException
SVIDResourceAdapter
buildUser
in class SVIDResourceAdapter
WavesetException
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
SVIDResourceAdapter
buildUser
in class SVIDResourceAdapter
WavesetException
protected WSUser buildUser(java.lang.String loginsResult, java.lang.String lastResult, WSUser targetUser) throws WavesetException
buildUser
in class SVIDResourceAdapter
WavesetException
protected void addLastLogin(java.lang.String lastResult, WSUser user)
addLastLogin
in class SVIDResourceAdapter
protected java.lang.String getMutexAcquireScript(java.lang.String uidMutexFile, java.lang.String tmpUidMutexFile, java.lang.String pidFoundFile)
getMutexAcquireScript
in class SVIDResourceAdapter
protected Script getScanningScript(java.util.Map scanArgs) throws WavesetException
getScanningScript
in class SVIDResourceAdapter
WavesetException
protected WavesetResult getScanningResult(CaptureList captureList, java.util.Map args) throws WavesetException
GenericScriptResourceAdapter
getScanningResult
in class SVIDResourceAdapter
WavesetException
protected java.util.ArrayList getRequiredNISCmds()
UnixResourceAdapter
getRequiredNISCmds
in class UnixResourceAdapter
protected java.util.ArrayList getRequiredUserCmds()
UnixResourceAdapter
getRequiredUserCmds
in class UnixResourceAdapter
protected java.util.ArrayList getReadOnlyTestCmds()
UnixResourceAdapter
getReadOnlyTestCmds
in class UnixResourceAdapter
protected java.util.List getDefaultShellsList()
getDefaultShellsList
in class UnixResourceAdapter
protected Script getShellsScript(Script script)
getShellsScript
in class UnixResourceAdapter
protected java.lang.String getGroupCreateGroupOpt()
protected boolean loginMustUseTerm()
public abstract java.lang.String getLoginUserAttrName()
getLoginUserAttrName
in class SVIDResourceAdapter
public abstract java.lang.String getLoginPasswordAttrName()
getLoginPasswordAttrName
in class SVIDResourceAdapter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |