Results 1 to 5 of 5

Thread: List all users on linux computer

  1. #1
    Join Date
    Jul 2009
    Posts
    46

    List all users on linux computer

    I have a linux box at home and i had two users. Now my cousin had visited my place and used my computer. He added a few more users. I don't know how many users now exist on my computer. How can i view all the users that have been created on my computer? In windows it was simple by just going to users accounts from control panel. Please help guys...

  2. #2
    Join Date
    May 2008
    Posts
    4,085

    Re: List all users on linux computer

    Thats very simple. Just go to /etc/ directory and open the passwd file using a text editor. Here you will get a list of users and their home directory that exists on your computer.

  3. #3
    Join Date
    Jan 2008
    Posts
    3,388

    Re: List all users on linux computer

    Yeah, thats right, or simple run the following command in console and list of users will appear in the console itself. Run this :
    Code:
    Cat /etc/passwd |grep "/home" |cut -d: -f1

  4. #4
    Join Date
    Jul 2009
    Posts
    46

    Re: List all users on linux computer

    Thanks guys for finding some time and helping me out... I deleted the unwanted users entries from passwd file and all the users vanished. I also deleted each unwanted users home directory... Thanks again...

  5. #5
    Join Date
    Jan 2009
    Posts
    1,738

    Re: List all users on linux computer

    Try this out to list users :
    Code:
    awk -F":" '{ print "username: " $1 "\t\tuid:" $3 }' /etc/passwd
    Hope this helps...

Similar Threads

  1. AD inactive users list?
    By Daiwikr in forum Active Directory
    Replies: 3
    Last Post: 30-03-2015, 03:58 PM
  2. Script to list users who Are connected
    By Ron1 in forum Networking & Security
    Replies: 3
    Last Post: 11-09-2009, 02:31 PM
  3. List all users with 'Password Never Expires'
    By Tirana in forum Active Directory
    Replies: 4
    Last Post: 03-09-2009, 06:56 AM
  4. list users account locked out in an OU
    By Gustavo in forum Windows Server Help
    Replies: 2
    Last Post: 29-01-2008, 08:27 AM
  5. Help :-( Export list of users
    By PureNectar in forum Active Directory
    Replies: 4
    Last Post: 06-12-2007, 07:00 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,637,608.58119 seconds with 17 queries