mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge branch '2014.7' of https://github.com/saltstack/salt into develop
This commit is contained in:
commit
bebf14ed31
@ -44,7 +44,9 @@ LIBCLOUD_FUNCS_NOT_SUPPORTED = (
|
||||
'saltify.avail_sizes',
|
||||
'saltify.avail_images',
|
||||
'saltify.avail_locations',
|
||||
'rackspace.reboot'
|
||||
'rackspace.reboot',
|
||||
'openstack.list_locations',
|
||||
'rackspace.list_locations'
|
||||
)
|
||||
|
||||
|
||||
|
@ -629,7 +629,7 @@ def show_lowstate(queue=False, **kwargs):
|
||||
def sls_id(
|
||||
id_,
|
||||
mods,
|
||||
saltenv,
|
||||
saltenv='base',
|
||||
test=None,
|
||||
queue=False,
|
||||
**kwargs):
|
||||
|
@ -35,6 +35,7 @@ def __virtual__():
|
||||
|
||||
|
||||
def add(name,
|
||||
password=None,
|
||||
# Disable pylint checking on the next options. They exist to match the
|
||||
# user modules of other distributions.
|
||||
# pylint: disable=W0613
|
||||
@ -61,7 +62,10 @@ def add(name,
|
||||
|
||||
salt '*' user.add name password
|
||||
'''
|
||||
ret = __salt__['cmd.run_all']('net user {0} /add'.format(name))
|
||||
if password:
|
||||
ret = __salt__['cmd.run_all']('net user {0} {1} /add /y'.format(name, password))
|
||||
else:
|
||||
ret = __salt__['cmd.run_all']('net user {0} /add'.format(name))
|
||||
if groups:
|
||||
chgroups(name, groups)
|
||||
if fullname:
|
||||
@ -320,10 +324,10 @@ def _get_userprofile_from_registry(user, sid):
|
||||
we can get it from the registry
|
||||
'''
|
||||
profile_dir = __salt__['reg.read_key'](
|
||||
'HKEY_LOCAL_MACHINE', 'SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\{0}'.format(sid),
|
||||
'HKEY_LOCAL_MACHINE', u'SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\{0}'.format(sid),
|
||||
'ProfileImagePath'
|
||||
)
|
||||
log.debug('user {0} with sid={2} profile is located at "{1}"'.format(user, profile_dir, sid))
|
||||
log.debug(u'user {0} with sid={2} profile is located at "{1}"'.format(user, profile_dir, sid))
|
||||
return profile_dir
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user