Thursday, February 14, 2008

About Linux Users

All linx users, their passwords and other details are stored in a one file. It is "passwd" file which is in the "etc" folder. {/etc/passwd}            

If we want to view password file {hm... there are several ways, but for the moment we will use "cat" command}.we will talk about "cat" command later. So in your command prompt {shell,terminal} run below command.

 cat /etc/passwd

This command will give you a file with several rows. One row is for one user. Let have a look on one row.

 melick:x:1000:1000:melickrajee:/home/melick:/bin/bash

 So let see what this line says. Following illustrate the format of the one line           

 username:password:Gid:Uid:Fullname:home folder:shell

 So now we compare those two for further details.

 melick       :x               :1000 :1000  :melickrajee  :/home/melick :/bin/bash

 username :password :Gid    :Uid     :Fullname     :home folder  :shell

  1. melick - Username
  2. x(password) - x is not the password. it says there is a password and its encrypted.
  3. 1000 (Gid) – Group ID
  4. 1000 (Uid) – User ID
  5. melickrajee - (Fullname) 
  6.  /home/melick (home folder) - this line shows what is the default folder for the user                       

/bin/bash (shell) - shell is a command prompt. there are many terminals in the linux like bash,sh,.. so we can define shell is used by the user. /bin/bash mean this user uses the "bash" shell which is in the "bin" folder. 'bash' is a programme also. if we assign the login as /sbin/nologin user cannot log in to the system. 

     

Post a Comment