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:

  • Linux File Sharing Using NFS(nfs server configuration on centos/Rhel)tion NFS stands for Network File System . NFS is a distributed file system protocol devoloped by sun microsystems at the year of 1984.Using nfs users can acces the shared data on other computers it also allows to automount th… Read More
  • Automount NFS share by editing fstab file in centos /RhelFor automounting NFS we have to /etc/fstab . The fstab file contains entries of partition to be auto mounted during linux system startup.please follow the video for mounting nfs share automatically. rsize - read size wsize… Read More
  • Assigning ip address to linux systemVideo number three is for beginners and it is assaigning IP address for your linux system. In this video i am showing you how to assign IP adress for your linux system by editing the configuration file.the configuration file&… Read More
  • Installing ubuntu on windows partitonIt is very easy to install ubuntu on your windows partiton with out formatting it .what we have to do is just put the cd to the windows machine and boot windows and open the drive.the video will take you through the further s… Read More
  • SELINUX BASICSHere i am going to explain the basic configuration of selinux.Through theses steps you can easily administrate your selinux policies. Here is the simple step of enabling and disabling policies of different application. In th… Read More