Raspberry Pi: Create a new user - how it works
It is possible to create multiple user accounts on the Raspberry Pi single-board computer. In this guide, we show you how to set up a new user.
Create a new user on your Raspberry Pi
To create a new user on your Raspberry Pi, you only have to do the following steps:
- First open a terminal on your Raspberry Pi.
- Then get SuperUser rights with the "sudo su" command.
- Now you can create a new user including the home directory with the "useradd -m USERNAME" command. Replace "USERNAME" with the name you want. If the user does not get a home directory, simply omit the "-m".
- So that the new user can also log in, you must assign a password to the user with "passwd USERNAME". This is not displayed in the terminal when it is entered and must be repeated again for security.
- Finally, you can add the new user to the main group of all users with "usermod -g users USERNAME".
- With "exit" you end the SuperUser rights and the new user can be used immediately.