useradd - create a new user or update default new user information
To add a new user $ sudo useradd user1
To create a user with a different home directory $ sudo useradd -d /home/klug user2
To create a user with a specific User ID $ sudo useradd -u 1004 user3
To create a user with a specific Group ID $ sudo -u 1004 -g admin user4
To add a user to multiple groups $ sudo useradd -G admin,devops,dev user5
To add a user without home directory $ sudo useradd -M user6
To create a user with an account expiry date $ sudo useradd -e 2024-04-04 user7
To create a user with password expiry date $ sudo -e 2024-04-04 -f 50 user1
To add a user with custom comments $ sudo useradd -c "welcome to user2" user2
To add a user without a login shell $ sudo useradd -s /sbin/nologin user3
To create user with home directory $ sudo useradd -m user4
regards, T.Dhanasekar