Linux/Unix Commands





Español Français 中文 Deutsch Portuguese Japanese nederlands
   
 
LINUX / UNIX cmd
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Introduction
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in A
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in B
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in C
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in D
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in E
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in F
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in G
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in H
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in I
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in J
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in K
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in L
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in M
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in N
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in P
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in R
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in S
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in T
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in U
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in W
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Commands in Y
Forums Ask your doubts
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example More about Linux
LINUX/UNIX Commands tutorial/reference - Find linux cmd, syntax, example Feedback
 





useradd Linux Commands


Tutorials Linux-commands

Topic

What is Linux useradd Command?



Explanation

useradd COMMAND:
     useradd - Adds new user to the linux system, with specified user-name. When a new user is added then a corresponding entry is made in files /etc/passwd, /etc/group and /etc/shadow

SYNTAX:
  The Syntax is
     useradd [options] [username]

OPTIONS:
     
-d Specifies the users home directory
-s Specifies the users shell
-g Specifies the users primary group
-G Specifies the users secondary groups
-M Specifies not to create home directory for the user
-e Specifies the expire date of the user
-uid Specifies the user-id of the user



EXAMPLE:
     
  1. To add new user:
    useradd hiox

    This command will add a new user with name hiox.

  2. To add user but not allow to login in the system:
    useradd -s /bin/nologin hiox

    This command will add user hiox but not allow to login.
    In above command:
    hiox-Is the user-name
    /bin/nologin-Is Shell assigned to the user

  3. To set expire date of the user:
    useradd -e 2008-06-30 hiox

    This command will add user hiox and set the expire date to 2008-06-30.
    In above command:
    hiox-Is the user-name
    2008-06-30-Is date on which the user-account will be expired

  4. To create user without creating home directory:
    useradd -M hiox

    The above command will create user hiox but home directory will not be created.





A Note

Find LINUX Commands... Hope you enjoy this tutorial. We welcome your Valuable feedbacks or suggestions on this LINUX / UNIX cmd reference. This is a copyright content.


Other Links

web hosting

 

Free Hosting

Top Hosting Companies