LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   List Users (https://www.linuxquestions.org/questions/linux-newbie-8/list-users-4175468638/)

ProfessorHicks 07-05-2013 06:30 PM

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?

GlennsPref 07-05-2013 06:34 PM

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

ProfessorHicks 07-05-2013 06:43 PM

Well, apparently you didn't read my post. I've tried those commands and it says no directory named passwd. Now what?

unSpawn 07-05-2013 07:01 PM

Quote:

Originally Posted by ProfessorHicks (Post 4984968)
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 (Post 4984968)
Now what?

Run the commands as listed and post them with the output (if any). 'cat /etc/passwd' should do even as unprivileged user.

TB0ne 07-05-2013 07:12 PM

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

Madhu Desai 07-06-2013 01:27 AM

@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

kooru 07-06-2013 03:56 AM

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.

GlennsPref 07-06-2013 09:14 AM

anyway, best of luck!


All times are GMT -5. The time now is 03:40 PM.