Merge pull request #28033 from twangboy/fix_win_useradd

Fixed win_useradd.py
This commit is contained in:
Mike Place 2015-10-16 13:19:44 -06:00
commit a3390cfbe6

View file

@ -659,7 +659,7 @@ def info(name):
ret['logonscript'] = items['script_path']
ret['profile'] = items['profile']
if not ret['profile']:
ret['profile'] = _get_userprofile_from_registry(name, ret['uid'])['vdata']
ret['profile'] = _get_userprofile_from_registry(name, ret['uid'])
ret['home'] = items['home_dir']
ret['homedrive'] = items['home_dir_drive']
if not ret['home']:
@ -679,7 +679,7 @@ def _get_userprofile_from_registry(user, sid):
'HKEY_LOCAL_MACHINE',
u'SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\{0}'.format(sid),
'ProfileImagePath'
)
)['vdata']
log.debug(u'user {0} with sid={2} profile is located at "{1}"'.format(user, profile_dir, sid))
return profile_dir