See also
Create a new user and its home directory.
If create_home is None (the default), a home directory will be created for normal users, but not for system users. You can override the default behaviour by setting create_home to True or False.
If system is True, the user will be a system account. Its UID will be chosen in a specific range, and it will not have a home directory, unless you explicitely set create_home to True.
If shell is None, the user’s login shell will be the system’s default login shell (usually /bin/sh).
Example:
import fabtools
if not fabtools.user.exists('alice'):
fabtools.user.create('alice')
with cd('/home/alice'):
# ...
Modify an existing user.
Example:
import fabtools
if fabtools.user.exists('alice'):
fabtools.user.modify('alice', shell='/bin/sh')