To create a linux user without home directory:
sudo useradd --no-create-home john
or
sudo useradd -M john
sudo: Grants administrative privileges.
useradd: Adds a new user
-M or --no-create-home: Skips creating a home directory for the new user.
john: Creates a new user named john.
Reference URL: https://linuxsimply.com/ubuntu-create-user-without-home-directory/
Top comments (0)