Linux - Create a user with user id uid, Add a user user by specifying UID

Create a user with user id uid


The useradd command is used to add a user

Create a user with unique user id
 # useradd -m -d /home/jaiho -u 625 -c "jaiho" -s /bin/bash jaiho
where,
-u : specify the user-id, The user id must be unique and numerical value.

-m : Create the users home directory if it does not exist. The files and directories contained in the skeleton directory will be copied to the home directory.

-d : The new user will be created using HOME_DIR as the value for the users login directory. The username as home directory.
-c : Specicy the user details, can add any comment about user for admin reference.
-s : specify the shell tobe used by the user


 # id jaiho
OUTPUT:
 # uid=625(jaiho) gid=625(jaiho) groups=625(jaiho)

The topic on Linux - Create a user with user id uid is posted by - Math

Hope you have enjoyed, Linux - Create a user with user id uidThanks for your time

Tech Bluff