120 comment

      1. $ who only shows you the name of the user you are currently logged into the system as. The ‘ cat /etc/passwd’ method shows all users register to the system. You can grep for userid as well which I picked up from a different post. You have to check your /etc/passwd file to see where added user id numbers start. The example i saw started at 500. Mine start 1000.

        $ cat /etc/passwd | egrep ‘[1][0-9][0-9][0-9]’

    1. Login with Any user which is Normal user not the Admin or root.
      eg:[[email protected]]#:
      Root is admin and if anything in place of root will be Local user.
      It will list the present working directory…
      type cd /home.
      then type ls

      It will list all the users created in Home directory…..

      1. You Didn’t read the above:

        Luca Francesca November 6, 2012, 12:44 pm
        User and their home
        cat /etc/passwd | awk -F: ‘{print $1,” =>”, $6}

        manju September 22, 2011, 2:52 pm
        type in root user
        ls /home/

        Andy October 16, 2011, 8:59 pm
        That will only work if there is a userfolder created for every user. And thats not necessary the case.

        1. hi,
          cut -d ” ” -f1 means d is delimiter .In this command delimiter is colon(:) .field1.If the file content is like this ramnaidu7:500:501:Bh.Ram .
          After issuing above command o/p is ramnaidu7 since colon(:) is the delimiter and that is considered as field1(f1)

  1. It was a really simple & useful tutorial.
    @Mehdi: Try something difficult;t as your password. Linux is intelligent enough to disallow simple dictionary word as password.
    Say for example you can try: awk007

  2. i just laod ubuntu and there is no option for PW during the installation now somw want to access my machine through SSH and asking for root PW how can i create the pw for root as well as other account and pw , please guide me ???

    1. Why would give somebody root access to your machine?
      Try the following

      sudo -i
      Enter your user password
      Then when logged in as root type
      to set a password for the root user.
      But i don’t recommend doing this, especially because you seem not to be too fond of linux….

  3. Hello,

    Is it possible to create a new user by edit the /etc/passwd file ?
    when i try to add a new line with a new user name, user ID , user comment, home directory
    it doesn’t work.
    What am i missing ?

    Thank you all,


    1. For user admin there are four commands mainly..


      So try the options for usermod as it is used to change username which is currently active in the Linux OS
      Try to find it from Internet and it will surely help…u

  4. how to boot dual booting windos, linux with together press F8 key
    then display windows, after press F8 key then display Linux What Coomand on the linux base

    Manoj Prajapati.
    SIET Gr. Noida

  5. Hi Guys,
    Do you want to give the root access to the normal Linux user, even after the root passwd get changed?

    Do follow below commands,
    Login as a root user,
    Let suppose the user is imtestuser
    [[email protected] ~]# useradd imtestuser
    [[email protected] ~]# passwd imtestuser
    [[email protected] ~]# visudo
    #One file get opened,
    # add the below line to the file
    imtestuser ALL=(ALL) NOPASSWD: ALL
    #save the file.
    [[email protected] ~]# su imtestuser
    [ [email protected] ~]#
    [ [email protected] ~]#
    [ [email protected] ~]#
    [ [email protected] ~]# sudo su –
    [ [email protected] ~]#

    # Now even after changing the passwd , ur imtestuser get authenticated without asking for passwd, and even it get changed…

    Girish Mahajan

  6. Continuing with above statements…
    Smarter person can do like ,

    [[email protected] ~]# adduser imtestuser –home /var/.imnotatheft/imtestuser
    [[email protected] ~]# passwd imtestuser
    [[email protected] ~]# visudo
    #One file get opened,
    # add the below line to the file
    imtestuser ALL=(ALL) NOPASSWD: ALL
    #save the file.
    [[email protected] ~]# su imtestuser
    [ [email protected] ~]# sudo su –
    [ [email protected] ~]#

    # Now even after changing the passwd , ur imtestuser get authenticated without asking for passwd, and even it get changed…

    Now , guys , by follwing these steps , u are creating let suppose a hidden user, having a grant to logged in to as a root user without passwd and all.

    Girya ! :)

      1. No you cannot create user without root Login,as Root is the Admin and only administrator has a rights to manage and create…

        root is the superuser in the Linux OS.
        If u try creating user with local user login
        EG:[[email protected]]#->This is the root user present
        If i create user
        useradd a
        passwd a
        if you type or change user :su – 2
        [[email protected]]$
        Type useradd b
        It wont work and will show you that u dont have superuser permission for it..

  7. Hey,
    there is also this option:

    adduser tomer -p Liux12345

    if you want to automate a scenario in which you need to define a user on a Linux machine programatically, using the above command will save you the hassle of getting prompts from the machine when defining a new user.


  8. Hey,

    I was wondering, in linux mint can you use internet explorer 7 still? And also, how do you change operating systems, like I have Windows Vista now, I dont want to get rid of it. I want to get a different operating system though, How could I change back and forth if I didnt like it?

  9. Hey..

    I have a linux server with 5 dedicate IPs on it.
    I have created 5 users on the server and want to restrict each users with 1 specific ips..
    user1 should only access the server with IP 1
    user2 should only access the server only with IP 2..etc

    awaiting for response

  10. Hi:
    I create a count with the name of IRAF and the next are: “IRAF Maintenance”, home directory “/iraf/iraf/local”, shell “/bin/tcsh”, and a secure password. ” In the directory it appears like “iraf:x:1001:1001::/home/iraf:/bin/sh”; wath does it means?
    …i’m a beginner, then I can’t find the properties and the user privilegies in the tabs. Where are they? I need it for the installation of IRAF in my UBUNTU 32-bit o.s.

    1. either make the user/ group of users owner of the directory
      use chown
      or change the permissions of the directory as read write [execute] to all
      sudo chmod 777 -R
      #with absolute path

  11. Hello guys,
    I have a vps that I must share with my developer and assistants, how can i prevent file download from server and allow just uploads?
    or how can i protect my files in vps from being downloaded ?
    what I must do?

    1. 1)If the User is not able to login though after entering password correctly,it means the user accct is locked.
      The only way to unlock is using the usermod command with the Arguments and options as mentioned per the Syntx..

      You can download or can know from google.com.
      2)if a user can forget the password ,Root user can go and reset it,else the user can also change the passwd but then he has to enter password with password complexity.ie. number,symbol and text…
      Root can changed without complexity..
      Choice is yours,Any issue kindly email me,will help you..

  12. When I type the command useradd it gives the following details please provide the solution
    [email protected] ~/Desktop $ useradd ram
    Command ‘useradd’ is available in ‘/usr/sbin/useradd’
    The command could not be located because ‘/usr/sbin’ is not included in the PATH environment variable.
    This is most likely caused by the lack of administrative priviledges associated with your user account.
    useradd: command not found

    1. You can go and install after creating a partition so as to make Two different OS.
      You should have min of 4 GB Ram and min of 512 HDD…
      But it will boot Linux first as it will be installed after preinstalled windows..
      So you can do this way by reading the docs from google ,i just provided you the idea..

      My opinion is to installed Linux virtually by the means of VMWARE workstation as it wont occupy space on ur physical HDD.
      I have installed the same as mentioned Virtualy.

  13. Hi ,
    I am a newbie to Linux.
    I want to know all the commands as well as their effects which will help me to manage a server. just like adding users,adding groups assigning them disk spaces and other things.

    Please help me out and if possible share with me some useful links .

    Thanks in Advance.

  14. Hi everyone, i am trying to add a user in ” /home/ ” but every time i get this error

    command ‘useradd’ is available in ‘/usr/sbin/useradd’
    the command could not be located because ‘/usr/sbin’ is not included in the PATH environment variable.
    This is most likely caused by the lack of administrative privileges associated with your user account.
    useradd: command not found.

    what should i do..??
    i use the syntax : “useradd desd”.

    I also tried sudo before the command but it wont accept the password ….

    1. Hi..

      you should try creating user in superuser mode..as Root is the ony user having sufficient priviledges for creation and deletion of users….

      You must be creating under local user login..
      try creating under Root user,it will work…

  15. how to create graphical user inferfaces login to my users for example ssh. ssh only text based login.but i need to configure my users graphical user inferface login. please solve this question?

    1. If you want a simple solution, you can use bash for this (This will vary for users of unity/gnome/kde). Use ‘zenity’ (see $zenity –help)

      $ export credentials=$(zenity –password –username)
      $ echo $credentials

  16. To see all the user accounts on your system;
    – First switch to a root user by issuing the command # su –
    – A password for root is required to switch.
    – Once successfully switched, use the command # cat /etc/passwd
    – All the user accounts will be listed including parameters except their password.

Leave a Comment