The 'useradd' command in linux

 

 

     useradd : it is used to add an user

     Format: useradd [options] username

     Eg: useradd –d /rock jack

     Here it adds a user and the sets the users homedir as /rock

     Eg2: useradd –L tom

     Locks the user tom while creating user tom

     Eg3: usermod –U tom

     Here it unlocks the user tom which is created earlier.

     Eg4:useradd –g linux tom

     Here it sets linux as tom’s primary group

     Eg5: usermod –G unix,manager tom

     Here it sets unix and manager as tom’s secondary groups.

     Eg6: usermod –s /sbin/nologin sam

     Here it allots /sbin/nologin shell to user sam

  • 23 Користувачі, які знайшли це корисним
Ця відповідь Вам допомогла?

Схожі статті

what is the command 'ls' used for?

       ls – list directory contents.    ...

for what the command 'tail' is used for?

  tail – print the last 10 lines of the named file.If more than one file is specified...

for what purpose the commad 'du' is used for?

      du- estimates the file space usage.   Format: du [options] [file]...

what is the use of command 'grep'?

    grep- search one or more files that matches a regular pattern  Format:...

'cp' command in linux

    cp - copy files and directories.  Format: cp [options] source...