diff options
author | Cem Keylan <cem@ckyln.com> | 2022-08-28 09:46:38 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2022-08-28 09:46:38 +0300 |
commit | 5b95a69c8f01d503897696ffc66446c06f2b6c50 (patch) | |
tree | 8cf1badf72598ad264c5202fa18d5ec3efeaea84 | |
parent | 746133c1d31be67e5a380c31c61c3e7abeda6693 (diff) | |
download | docs-5b95a69c8f01d503897696ffc66446c06f2b6c50.tar.gz |
docs: add section for creating users
-rw-r--r-- | carbslinux.org | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/carbslinux.org b/carbslinux.org index ecc8ba7..9c274a8 100644 --- a/carbslinux.org +++ b/carbslinux.org @@ -53,6 +53,7 @@ with your favorite pager. You can install either the @command{info} or - [[#system-configuration][System Configuration]] - [[#configuring-hostname][Configuring hostname]] - [[#hosts-file][Hosts file]] + - [[#creating-a-user][Creating a user]] - [[#kernel][Kernel]] - [[#obtaining-the-kernel-sources][Obtaining the kernel sources]] - [[#kernel-dependencies][Kernel dependencies]] @@ -398,6 +399,37 @@ replace the 'localhost' part of these entries to your hostname. ::1 localhost.localdomain localhost ip6-localhost #+END_EXAMPLE +*** Creating a user +:PROPERTIES: +:DESCRIPTION: Adding a user to your new system +:END: + +Creating a new user is not strictly necessary, but it is highly recommended. +Especially for building packages, it is the safest option to create an +unprivileged user and using =doas= for doing operations that require =root= +privileges. The code block below describes how to create a user (named =foo=), +add them to the wheel group, and to give doas permissions to the wheel group + +#+BEGIN_SRC sh +# Create the new user +adduser foo + +# Add the user to the wheel group +addgroup foo wheel + +# Give root permission to the wheel group using doas +echo permit persist :wheel >> /etc/doas.conf +#+END_SRC + +You are also advised to take a look at the doas configuration file and the +manual page of doas. + +After you are finished you can switch to the new user by running + +#+begin_src sh +su foo +#+end_src + ** Kernel :PROPERTIES: :DESCRIPTION: Compiling your own kernel |