LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-05-2013, 07:30 PM   #1
ProfessorHicks
LQ Newbie
 
Registered: Jun 2013
Posts: 2

Rep: Reputation: Disabled
List Users


I've tried using the command "cd /etc/passwd" but it says no directory. I then went into /etc and then listed the directories and saw the /passwd directory but still unable to get into it. So, what else can i do to list all users?
 
Old 07-05-2013, 07:34 PM   #2
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Posts: 3,366
Blog Entries: 33

Rep: Reputation: 216Reputation: 216Reputation: 216
Quote:
Hi, Welcome to LQ!

LQ has a fantastic search function that may save you time waiting for an answer to a popular question.

With over 4 million posts to search it's possible the answer has been given.
https://www.linuxquestions.org/linux...all_your_USERs

HTH's Glenn

Last edited by GlennsPref; 07-05-2013 at 07:35 PM. Reason: Welcome to LQ
 
Old 07-05-2013, 07:43 PM   #3
ProfessorHicks
LQ Newbie
 
Registered: Jun 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
Well, apparently you didn't read my post. I've tried those commands and it says no directory named passwd. Now what?
 
Old 07-05-2013, 08:01 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531
Quote:
Originally Posted by ProfessorHicks View Post
Well, apparently you didn't read my post. I've tried those commands and it says no directory named passwd.
Your OP doesn't show you ran any of the commands listed so reign it in a bit.


Quote:
Originally Posted by ProfessorHicks View Post
Now what?
Run the commands as listed and post them with the output (if any). 'cat /etc/passwd' should do even as unprivileged user.
 
Old 07-05-2013, 08:12 PM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,956

Rep: Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693
Also, there is no /etc/passwd directory. That's a file, so the cd command will fail on it. If you cat that file out, you can see the users in it
 
Old 07-06-2013, 02:27 AM   #6
mddnix
Member
 
Registered: Mar 2013
Location: Bangalore, India
Distribution: Redhat, Arch, Ubuntu
Posts: 512

Rep: Reputation: 139Reputation: 139
@ProfessorHicks

If you have difficulty in finding out whether something is a file or directory, you can use 'ls -l', and check its first bit:

'-'is a regular file
'd' is a directory

There are total 7 types of files:
1. Regular file(-)
2. Directory files(d)
3. Block file(b)
4. Character device file(c)
5. Named pipe file or just a pipe file(p)
6. Symbolic link file(l)
7. Socket file(s)

More:
File types in Linux Explained
 
Old 07-06-2013, 04:56 AM   #7
kooru
Senior Member
 
Registered: Sep 2012
Posts: 1,385

Rep: Reputation: 273Reputation: 273Reputation: 273
Hi ProfessorHicks,

could be useful this link to learn some simple things about linux
Don't see it as "lost time". Learn a new thing is always a benefit.
 
Old 07-06-2013, 10:14 AM   #8
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Posts: 3,366
Blog Entries: 33

Rep: Reputation: 216Reputation: 216Reputation: 216
anyway, best of luck!

Last edited by GlennsPref; 07-06-2013 at 10:25 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
List 4 names from users list and output them to fbusers in numbered ascending order? fezzie Programming 4 02-10-2010 02:05 PM
list the users masatheesh Linux - Server 4 04-30-2009 12:34 PM
List of users nickyboy Linux - Newbie 1 04-20-2006 02:15 PM
list of users Ab3n Linux - Newbie 3 03-08-2006 01:30 PM
List all users eam Linux - Newbie 7 05-16-2005 12:55 AM


All times are GMT -5. The time now is 01:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration