diff --git a/docs/alpine-desktop-setup/post-install/users.md b/docs/alpine-desktop-setup/post-install/users.md index d4d9fc8..ad36329 100644 --- a/docs/alpine-desktop-setup/post-install/users.md +++ b/docs/alpine-desktop-setup/post-install/users.md @@ -29,10 +29,16 @@ And create a `_power` group for user's to be able to poweroff the system without Adding a user in alpine can be done using the `setup-user` script. Here we can specify the name, fullname, groups and more: ``` -# setup-user -g wheel,plugdev,_seatd,nix -f <"Full Name"> +# setup-user -g wheel,plugdev,_seatd,nix,_power -f "" # passwd ``` +And you (might) have to change the shell of the user in `/etc/passwd` from `/sbin/nologin` to a shell from `/etc/shells`. Alpine Linux comes with `/bin/ash` by default: + +``` +:x:1234:1234::/home/:/bin/ +``` + > It's also recommended to have an "admin" account which is the only one in the wheel group. Don't login yet if you want to encrypt the directory. @@ -85,11 +91,25 @@ Encrypt the directory with: ``` # fscrypt encrypt /home/ --user= -[Enter 1 so that it's unlocks when the user logs in] +[Create a new login protector] +[Enter 1 so that it unlocks the directory when the user logs in] ``` -Then login with the user to check if it worked. It should also have given you a recovery password which should be stored somewhere safely (like Bitwarden). To check the status of the directory run: +Then reboot and login with the user to check if it worked. It should also have given you a recovery password which should be stored somewhere safely (like Bitwarden). To check the status of the directory run: ``` $ fscrypt status /home/ ``` + +## TLDR + +If you have already set up a system with a user but want to add another do this: + +``` +# setup-user -g (wheel,)plugdev,_seatd,nix,_power -f "" +# passwd +[Change shell in /etc/passwd] +# fscrypt encrypt /home/ --user= +[Create a new login protector] +[Enter 1 so that it unlocks the directory when the user logs in] +```