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)
|