Users
A regular user facilitates the non-administrative functions of a system:
- Log in as the root user.
- Create a regular password-protected user with
useradd larry && passwd larry
. - Assign root privileges with
usermod -aG sudo larry
. - Create a user-owned home directory with
mkdir /home/larry && chown larry: /home/larry
. - Log in as the regular user.
- Test regular user privileges with
whoami
(expected:larry
) andsudo whoami
(expected:root
). - Change the default shell with
chsh -s /usr/bin/example
. I usually choose Zsh for the regular user.
Substitute larry
with your own username.
Tips
- Available shells are listed with
cat /etc/shells
. - It is recommended to not change the root user’s shell to a non-default shell. A mistake here may permanently brick your system.
- The root user should have a different password from all regular users. While there are smarter security measures if your machine sits all day at home, this provides an opportunity to learn when each password is used (eg.: any
sudo ...
command andsu
).