TrueNAS SCALE Documentation Archive
This content follows the TrueNAS SCALE 22.12 (Bluefin) releases. Archival documentation is provided for reference only and not actively maintained.
Use the Product and Version selectors above to view content specific to different TrueNAS software or major versions.
User
15 minute read.
Last Modified 2024-03-19 08:47 EDTThe TrueNAS CLI guide for SCALE is a work in progress! New namespace and command documentation is continually added and maintained, so check back here often to see what is new!
The user namespace has 14 commands and is based on Users functions found in the SCALE API and web UI. It provides access to user account creation, configuration, and attribute management. You can also set up a local administrator account using this namespace.
The following user namespace commands allow you to manage user accounts.
You can enter commands from the main CLI prompt or from the account namespace prompt.
The create command configures a new user account.
create has 19 available properties for account configuration.
They are uid, username, group, group_create, home, home_mode, home_create, shell, full_name, email, password, password_disabled, locked, smb, sudo_commands, sudo_commands_nopasswd, sshpubkey, groups, and attributes.
Property arguments use the = delimiter to separate the property and value. For example, uid=3000.
See the table below for details.
The delete command erases an existing user account.
The TrueNAS CLI guide for SCALE is a work in progress! Full documentation for this command is still being developed. Check back for updated information.
The get_instance command retrieves information about a user such as their username, UID (User ID), group membership, permissions, and other relevant attributes.
The get_next_uid command displays the next available user identification number (UID).
The get_user_obj command returns dictionary containing information from struct passwd for the user and bypasses user cache.
The has_local_administrator_set_up command returns whether a local administrator account with a valid password exists.
The has_root_password command is a deprecated method. Use the has_local_administrator_set_up command instead.
The pop_attribute command removes attributes, defined by a key, from a user dictionary. See also set_attribute and Create Configuration Properties.
The TrueNAS CLI guide for SCALE is a work in progress! Full documentation for this command is still being developed. Check back for updated information.
The query command retrieves information about a user or users and can use various query-filters and query-options.
The set_attribute command sets a user’s general purpose attributes dictionary key to a specified value. See also pop_attribute and Create Configuration Properties.
The set_root_password command is a deprecated method. Use the setup_local_administrator command instead.
The setup_local_administrator command creates and configures an admin account. It can be used during initial configuration.
Thesetup_local_administratorcommand only works if both a local administrator and root password have not been configured. This means that you have either performed a fresh install of SCALE, and chose to not configure an admin or root password in the TrueNAS Console installer, or you have reset configuration to defaults and have not yet logged in to the SCALE Web UI. If either a local administrator or a root password exist, this command returnsError: Local administrator is already set up.
The shell_choices command returns the shell choices available to user accounts.
The update command updates the attributes of an existing user. For available properties, see create.
