Low Orbit Flux Logo 2 F

Arch Linux How to Create User - Fast - Easy

A common operation you may find yourself doing is creating users. Arch Linux isn’t all that different from other distros. We’re going to talk about how to create a user on Arch.

To create a user named ‘steve’ just run the following. This will ensure that a homedir is created and that the user can login.

sudo useradd -m steve
sudo passwd steve

As an alternative, you could also do the following:

sudo useradd -m steve -p s3cre7Passw0rd

In case you want to setup a custom directory you can use this:

sudo useradd -d /home/notsteve -m steve -p s3cre7Passw0rd

Custom groups can be defined at the time of account creation like this:

sudo useradd -G group1 -d /home/notsteve -m steve -p s3cre7Passw0rd

System users can be added like this:

sudo useradd -r -s /usr/bin/nologin steve

Important Considerations When Creating Users on Arch

You don’t want to forget sudo permissions.

Edit your sudoers file with the visudo command:

visudo

Uncomment the line for the wheel group. It should look like this:

%wheel ALL=(ALL) ALL

Specify the wheel group when adding a user:

useradd -m -G wheel -s /bin/bash steve
sudo passwd steve

References