The user module is used to create and manage user settings, users can be set as either absent or present
fred:
user.present:
- fullname: Fred Jones
- shell: /bin/zsh
- home: /home/fred
- uid: 4000
- gid: 4000
- groups:
- wheel
- storage
- games
testuser:
user.absent
salt.states.user.
absent
(name, purge=False, force=False)¶Ensure that the named user is absent
salt.states.user.
present
(name, uid=None, gid=None, gid_from_name=False, groups=None, optional_groups=None, remove_groups=True, home=None, createhome=True, password=None, enforce_password=True, empty_password=False, shell=None, unique=True, system=False, fullname=None, roomnumber=None, workphone=None, homephone=None, date=None, mindays=None, maxdays=None, inactdays=None, warndays=None, expire=None)¶Ensure that the named user is present with the specified properties
NOTE: If the same group is specified in both "groups" and "optional_groups", then it will be assumed to be required and not optional.
Changed in version 0.16.0: BSD support added.
User comment field (GECOS) support (currently Linux, FreeBSD, and MacOS only):
The below values should be specified as strings to avoid ambiguities when the values are loaded. (Especially the phone and room number fields which are likely to contain numeric data)
Changed in version 2014.7.0: Shadow attribute support added.
Shadow attributes support (currently Linux only):
The below values should be specified as integers.