33 lines
1.1 KiB
Markdown
33 lines
1.1 KiB
Markdown
|
Adding a user to the system is essential for actually using it as a desktop. It is pretty straight forward:
|
||
|
|
||
|
``` shell-session
|
||
|
root@host:~# useradd -m -G <wheel,>plugdev,pipewire -s /bin/bash <username>
|
||
|
root@host:~# passwd <username>
|
||
|
...
|
||
|
passwd: password updated successfully
|
||
|
```
|
||
|
|
||
|
> The `pipewire` group will not exist yet until the corresponding package is installed.
|
||
|
|
||
|
The `wheel` group should ideally only be assigned to one singular admin account. The users in the group are allowed to use the `doas` command to gain root privileges. This is necessary for installing packages and changing system files but not for a normal user.
|
||
|
|
||
|
## Doas
|
||
|
|
||
|
Installing and configuring `doas` should be done like so.
|
||
|
|
||
|
``` title="/etc/portage/package.use/doas"
|
||
|
app-admin/doas persist
|
||
|
```
|
||
|
|
||
|
> This USE flag is necessary when typing the user's password every few seconds gets to annoying.
|
||
|
|
||
|
``` shell-session
|
||
|
root@host:~# emerge -av doas
|
||
|
```
|
||
|
|
||
|
``` title="/etc/doas.conf"
|
||
|
permit persist :wheel as root
|
||
|
```
|
||
|
|
||
|
Now users who are in the `wheel` group are allowed to use the `doas` command to gain root privileges.
|