Tuesday, January 5, 2010

How to add a user account in Redhat Linux

This snip will help you create a user account from shell in Redhat linux. Only root users can avail this.
-----------------------------------------------------------------------------------
Step 1: Create a user account. The following command will create a user account with the specified and names the home directory as . If you want the home dir in different name, specify "-b ". This will create a home directory with both and combined.
shell #> useradd -m

Step 2: Set passwd for the
shell #> passwd
New Passwd :
Re-type passwd:

Step 3: Navigate the new user's home directory
shell #>cd /home/
-----------------------------------------------------------------------------------
Eg : shell #> userid -m rajesh
shell #>passwd rajesh
New passwd : xxxxxxxx
Re-type passwd : xxxxxxxx
shell #> cd /home/rajesh
shell #> pwd
/home/rajesh