Users

To create regular user called dummy type:

useradd -d /home/dummy dummy
mkdir -v /home/dummy
chown dummy /home/dummy

To assign password to user called dummy just type:

passwd dummy

To add user called dummy to group sudo just type:

usermod -a -G sudo dummy

To check user membership a id command can be used:

id

To delete user called dummy and it homedir just type:

userdel -rf dummy

Home directory template

Home directory of new user is don't contain any folder or files. If you wish to create template for users home directory (a.k.a. skeleton directory) place it in /etc/skel directory. When you add new user pass -k parameter with folder template path.

useradd -d /home/dummy -k /etc/skel dummy

Default users

ULFS can contain 3 default users:

  • root (UID:0) - root is system administrator he can perform all operations. This user is creared on LFS base image stage.
  • maintainer (UID:801) - user which should be used after sudo package installation.
  • user (UID:1000) - first user which can have UID=1000 equal to first user on all distribs. You should use this user when you working with first user data on other distribs images and partitions.

There are also many system users which created for specific packages.