Manage users on Mac OS 10.7+
Add a user to the minion
CLI Example:
salt '*' user.add name <uid> <gid> <groups> <home> <shell>
Change the user's Full Name
CLI Example:
salt '*' user.chfullname foo 'Foo Bar'
Change the default group of the user
CLI Example:
salt '*' user.chgid foo 4376
Change the groups to which the user belongs. Note that the user's primary group does not have to be one of the groups passed, membership in the user's primary group is automatically assumed.
CLI Example:
salt '*' user.chgroups foo wheel,root
Change the home directory of the user
CLI Example:
salt '*' user.chhome foo /Users/foo
Change the default shell of the user
CLI Example:
salt '*' user.chshell foo /bin/zsh
Change the uid for a named user
CLI Example:
salt '*' user.chuid foo 4376
Remove a user from the minion
CLI Example:
salt '*' user.delete foo
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 all users
CLI Example:
salt '*' user.list_users
Current Salt release: 2014.1.6
Docs for previous releases on salt.rtfd.org.