7 lines
2.7 KiB
Python
7 lines
2.7 KiB
Python
|
|
||
|
from ops.data import OpsClass, OpsField, DszObject, DszCommandObject, cmd_definitions
|
||
|
import dsz
|
||
|
if ('users' not in cmd_definitions):
|
||
|
dszusers = OpsClass('user', {'passwordexpired': OpsField('passwordexpired', dsz.TYPE_BOOL), 'userid': OpsField('userid', dsz.TYPE_INT), 'numlogons': OpsField('numlogons', dsz.TYPE_INT), 'primarygroupid': OpsField('primarygroupid', dsz.TYPE_INT), 'privilege': OpsField('privilege', dsz.TYPE_STRING), 'passwordlastchanged': OpsField('passwordlastchanged', dsz.TYPE_STRING), 'lastlogon': OpsField('lastlogon', dsz.TYPE_STRING), 'accountexpires': OpsField('accountexpires', dsz.TYPE_STRING), 'homedir': OpsField('homedir', dsz.TYPE_STRING), 'comment': OpsField('comment', dsz.TYPE_STRING), 'usershell': OpsField('usershell', dsz.TYPE_STRING), 'fullname': OpsField('fullname', dsz.TYPE_STRING), 'name': OpsField('name', dsz.TYPE_STRING), 'flags': OpsClass('flags', {'authflags': OpsClass('authflags', {'authopcomm': OpsField('authopcomm', dsz.TYPE_BOOL), 'authopaccts': OpsField('authopaccts', dsz.TYPE_BOOL), 'authopprint': OpsField('authopprint', dsz.TYPE_BOOL), 'authopserver': OpsField('authopserver', dsz.TYPE_BOOL), 'mask': OpsField('mask', dsz.TYPE_INT)}, DszObject, single=True), 'accountflags': OpsClass('accountflags', {'lockout': OpsField('lockout', dsz.TYPE_BOOL), 'dontexpirepasswd': OpsField('dontexpirepasswd', dsz.TYPE_BOOL), 'script': OpsField('script', dsz.TYPE_BOOL), 'acctdisable': OpsField('acctdisable', dsz.TYPE_BOOL), 'passwordcantchange': OpsField('passwordcantchange', dsz.TYPE_BOOL), 'tempduplicateacct': OpsField('tempduplicateacct', dsz.TYPE_BOOL), 'homedirreqd': OpsField('homedirreqd', dsz.TYPE_BOOL), 'trustedfordeleg': OpsField('trustedfordeleg', dsz.TYPE_BOOL), 'interdomaintrustacct': OpsField('interdomaintrustacct', dsz.TYPE_BOOL), 'passwordexpired': OpsField('passwordexpired', dsz.TYPE_BOOL), 'notdelegated': OpsField('notdelegated', dsz.TYPE_BOOL), 'normalacct': OpsField('normalacct', dsz.TYPE_BOOL), 'servertrustacct': OpsField('servertrustacct', dsz.TYPE_BOOL), 'dontrequirepreauth': OpsField('dontrequirepreauth', dsz.TYPE_BOOL), 'trustedtoauthenticatefordelegation': OpsField('trustedtoauthenticatefordelegation', dsz.TYPE_BOOL), 'usedeskeyonly': OpsField('usedeskeyonly', dsz.TYPE_BOOL), 'passwordnotreqd': OpsField('passwordnotreqd', dsz.TYPE_BOOL), 'smartcardreqd': OpsField('smartcardreqd', dsz.TYPE_BOOL), 'encryptedtextpasswdallw': OpsField('encryptedtextpasswdallw', dsz.TYPE_BOOL), 'workstattrustacct': OpsField('workstattrustacct', dsz.TYPE_BOOL), 'mask': OpsField('mask', dsz.TYPE_INT)}, DszObject, single=True)}, DszObject, single=True)}, DszObject, single=False)
|
||
|
userscommand = OpsClass('users', {'user': dszusers}, DszCommandObject)
|
||
|
cmd_definitions['users'] = userscommand
|