USER MANAGEMENT BASICS


HERE I AM INTRODUCING SOME USER COMMAND AND THEIR USE IN OUR
DAILY USER ADMINISTRATION

useradd - for adding users to your linux machine

syntax : useradd -[option] [$username]

the main options are as listed below with a example.


useradd -u 508 -d /var/user1 -s /bin/bash newuser
create a user named newuser with uid 508 ,home directory /var/user1 and default shell as /bin/bash

useradd -M newuser4 
create a user named newuser4 without creating a home directory for the user

useradd -N newuser5
create a user named newuser5 without creating a private group for the user

useradd -r newuser6 
create a system user ie uid below 500


useradd -e 2013-12-05 newuser1
create a user named newuser1 with expire date 05-12-2013

useradd -g ftp newuser2
create a user named newuser2 with default group as ftp here instead of group name we can also use 
the gid of the perticular group

useradd -G ftp,root newuser3
create a user named newuser3 with primary group newuser3 and secondry groups root,ftp


usermod -Command used for modifying the user parameters.

syntax : usermod -[option] [$user]
the above mentioned options (ie useradd options) can also used with usermod


userdel : Command for deleting user

syntax : userdel -[option] [$user]

userdel without option will delete the user but it will not delete the home directory for the user for that we have to use -r option

userdel -r newuser3

this command remove newuser3 as well as its home directory

groupadd - Command used for adding a group

syntax : groupadd -[options] [$groupname]

here is some examples 

groupadd -g 567 newgroup

create a group named newgroup with gid 567

groupmod -Command for modifying group parameter 

groupdel - Command for removing a group 

                                                                                                                                 continued ...............

01:30Anuroop Melarayil

Related Posts:

  • Common Ftp Folder for all FTP usersAs the requirement from some some of our blog user,i am forced to discuss about configuring a common ftp folder for all users.The configuration file /etc/vsftpd/vsftpd.conf  contains all configuration of our vsftp.so we … Read More
  • Secure linux system by using GRUB PASSWORDoIt is very easy to change our root password when somebody get the physical acess to your system. In order to protect your root password  we can protect your GRUB using a password.The Grub password will restrict the phys… Read More
  • ENABLE ROOT LOGIN VIA TELNET in centos/rhelThis video shows how to login as root directly via telnet.For we have to edit the configuration file /etc/securetty and add the entry for terminal which we want to login as root.by defualt TELNET,RSH etc. will not allow root … Read More
  • Root Password Recovery In LinuxSome time will all forget something ,its natural .Here i am going to demonstrate how to reset the  root password in a Linux system with help of some screenshot .This screenshot shows how to … Read More
  • TELNET SERVER CONFIGURATION IN CENTOS/RHELNow we are going to Install Telnet server on our Centos 6.2 Server.The following videos will help you in configuring the telnet server Thanks for Watching the video… Read More