Many of the steps here can be considered optional, depending on how you intend to use your Raspberry Pi. The steps described here assume typical usage, and if you're not already familiar with the system are recommended.
Install Sudo
- It's not wise to use your system always as the root user, so you'll want to create a regular user account with permision to perform root functions under sudo. To install sudo:
-
-
- # pacman -S sudo
-
- To give your regular user permission to use sudo, you need to edit the configuration file using visudo:
-
-
- # EDITOR=nano visudo
-
- Locate the section marked as:
-
-
- ##
-
-
-
- ## User privilege specification
-
-
-
- ##
-
-
- and uncomment the line below to say
-
-
- %wheel ALL=(ALL) ALL
-
- Save and exit.
Create Regular User Account
- Create a new user to use regularly:
On a typical desktop system, use the following command to add a new user, specify Bash as their login shell and add them to the wheel group:
# useradd -m -G wheel -s /bin/bash newuser
This command will also automatically create a group called after your username with the same GID as the UID of the user and makes this the default group for your account on login. Making each user have their own group (with group name same as user name and GID same as UID) is the preferred way to add users.
Now set a password:
# passwd newuser
- Logout, and relogin as the regular user:
-
-
- # logout
- login: newuser
- password: yourpassword
- $
-
- (Note the change in prompt from # to $. This will help you know if you're logged in as root or not.) From now on, you should use your regular user for everything. When root needs to do something on your system, use sudo. (The first time you use it, the display will show some general good-behavior rules for its use.)