Manage Windows users with the net user command
NOTE: This currently only works with local user accounts, not domain accounts
Add a user to the minion
CLI Example:
salt '*' user.add name password
Add user to a group
CLI Example:
salt '*' user.addgroup username groupname
Change the full name of the user
CLI Example:
salt '*' user.chfullname user 'First Last'
Change the groups this user belongs to, add append to append the specified groups
CLI Example:
salt '*' user.chgroups foo wheel,root True
Change the home directory of the user, pass True for persist to move files to the new home directory if the old home directory exist.
CLI Example:
salt '*' user.chhome foo \\fileserver\home\foo True
Change the profile directory of the user
CLI Example:
salt '*' user.chprofile foo \\fileserver\profiles\foo
Remove a user from the minion NOTE: purge and force have not been implemented on Windows yet
CLI Example:
salt '*' user.delete name
Return the list of all info for all users
CLI Example:
salt '*' user.getent
Return user information
CLI Example:
salt '*' user.info root
Return a list of groups the named user belongs to
CLI Example:
salt '*' user.list_groups foo
Return a list of users on Windows
Remove user from a group
CLI Example:
salt '*' user.removegroup username groupname
Change the username for a named user
CLI Example:
salt '*' user.rename name new_name
Set a user's password
CLI Example:
salt '*' user.setpassword name password
Docs for previous releases are available on readthedocs.org.
Latest Salt release: 2015.5.2