Find the answer to your Linux question:
Results 1 to 10 of 10
Hello. When I run the command "users" I get : "nick nick" I would think my name would only appear once. I was playing around with useradd so its possible ...
  1. #1
    Linux Newbie
    Join Date
    Jun 2009
    Posts
    111

    [SOLVED] ubuntu newbie trying to understand users command

    Hello.

    When I run the command "users" I get :
    "nick nick"

    I would think my name would only appear once. I was playing around with useradd so its possible I duplicated myself. Is this output correct, and, if not, how do I get rid of the redundancy?

    Thanks in advance.
    Last edited by MikeTbob; 01-03-2010 at 01:43 AM. Reason: bad formatting in the Title

  2. #2
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    1,946
    When I use the "users" command I get my username once. You can get non system users by:

    cat /etc/passwd | grep 500*

    and might be able to see from that if you have two "nick" users.

  3. #3
    Linux Newbie
    Join Date
    Jun 2009
    Posts
    111
    Thanks for the help.

    When I run "cat /etc/passwd grep 500*" nothing is returned. So I am assuming nothing was found matching 500*.

  4. #4
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    shouldn't grep for uid

    Code:
    grep nick /etc/passwd

  5. #5
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    1,946
    When I run "cat /etc/passwd grep 500*" nothing is returned.
    You entered it incorrectly. cat /etc/passwd| grep 500*

    shouldn't grep for uid
    No argument with that, never had to do this, would you happen to know a reason.?
    Have you tried coopstahs suggestion?

  6. #6
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    well you could get for uid I suppose, but 500* would only match 500[0-9], 5000[0-9], 5001[0-9], etc

  7. #7
    Linux Newbie
    Join Date
    Jun 2009
    Posts
    111
    Ok. When I run the command grep /etc/passwd here's what I get:

    grep nick /etc/passwd
    nick: x:1000:1000:myfullname,,,:/home/nick:/bin/bash

  8. #8
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    i don't know if its a problem anyway

    on arch when I run it I have 2 show up as well

    Code:
    [ccooper@ccooper-laptop vpnclient]$ users
    ccooper ccooper

  9. #9
    Linux Newbie
    Join Date
    Jun 2009
    Posts
    111
    Well, I guess if its happening to you too then everything is ok. (I'm running Linuxmint)

    Thanks for the help.

    take care.

  10. #10
    Super Moderator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,145
    I think what you are seeing is the username and group
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...