# Users A user should be added to improve security of the system. ``` # useradd ``` Configure a password for the user: ``` # passwd ``` The user may be added to certain groups, to give it some rights. ``` # usermod -aG wheel,audio,video,kvm,tty,input,storage ``` The package `sudo` that is present in the `base-system` package will be removed. Since, it is bloatware. To persist this. That is sudo will not be installed ever again on the system. Create `/etc/xbps.d/nosudo.conf` and insert: ``` ignorepkg=sudo ``` Then remove `sudo`. ``` # xbps-remove -Ry sudo ``` The `sudo` package will be replaced by `opendoas`. To install it: ``` # xbps-install -Sy opendoas ``` Symlink it to `/bin/sudo` so that applications which require root can still be granted by the user. ``` # ln -s /bin/doas /bin/sudo ``` And edit `/etc/doas.conf` to give users in the `wheel` group access to the `doas` command. ``` permit persist :wheel as root ``` To finalize this section, the `.bashrc` and `.bash_profile` configuration files will be copied to the home space of the user. ``` $ cp {config-files-repo}/bash/.bashrc .bashrc $ cp {config-files-repo}/bash/.bash_profile .bash_profile ``` ## User directories It is generally beneficial to set default user directories. To obtain some consistency in the `home` directory. This may be obtained with the `xdg-user-dirs` package. It may be installed with. ``` # xbps-install -Sy xdg-user-dirs ``` then run: ``` $ xdg-user-dirs-update ``` This will create a whole suite of default user directories and in `.config` it will create `user-dirs.dirs` and `user-dirs.locale`. With `.config/user-dirs.dirs` the syntax of of the directories may be set. ``` $ cp {config-files-repo}/xdg-user-dirs/user-dirs.dirs .config/ ``` Then to persist the modifications. ``` $ xdg-user-dirs-update ```