> For the complete documentation index, see [llms.txt](https://www.techwithtyler.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.techwithtyler.dev/operating-systems/linux/users-and-groups.md).

# Users and Groups

## Users

### Creating Users

<pre class="language-sh"><code class="lang-sh"><strong># Create a user and immediately set the password
</strong><strong>sudo useradd sshuser &#x26;&#x26; sudo passwd sshuser
</strong><strong>
</strong><strong># Create a user with a home directory (-m) and immediately set the password
</strong><strong>sudo useradd -m sshuser &#x26;&#x26; sudo passwd sshuser
</strong><strong>
</strong><strong># If you need to create a home directory for an existing user that doesn't have one
</strong><strong>sudo mkhomedir_helper sshuser
</strong></code></pre>
