Listing Users


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Listing Users
# 1  
Old 11-05-2012
Listing Users

Is there another command I can use to list users other than lsuser?
# 2  
Old 11-05-2012
Can you be more specific?
You can look at the /etc/passwd file to learn all possible connections.
Are you trying to determine who is currently connected?

What?
# 3  
Old 11-05-2012
Code:
cat /etc/passwd | cut -d \: -f1

# 4  
Old 11-05-2012
joeyg:
I need to see what users have access to this particular UNIX box. The ls command has been blocked. I know there is another command to use because I've used it in the past but I have forgotten it.

---------- Post updated at 08:39 AM ---------- Previous update was at 08:37 AM ----------

Skrynesaver:

Thanks that worked for me. I'm not very experienced in UNIX so I have another question. How can I send this information, with this command to a file?
# 5  
Old 11-05-2012
Code:
cat /etc/passwd | cut -d \: -f1 > user_list

# 6  
Old 11-05-2012
thank you Skrynesaver
# 7  
Old 11-05-2012
Quote:
Originally Posted by Skrynesaver
Code:
cat /etc/passwd | cut -d \: -f1 > user_list

You get a useless use of cat award.

cut, and any other shell utility, does not need cat's help to read a single file. Many things will take the filename directly, others can have the file redirected into them.

Code:
cut -d \: -f1 /etc/passwd > user_list

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Create multiple users with individual passwords to users

hi, i am new to shell scripts i write a shell script to create multiple users but i need to give passwords to that users while creating users, command to write this script (1 Reply)
Discussion started by: DONFOX
1 Replies

2. UNIX for Dummies Questions & Answers

[Solved] How to remove listing of current user cmd from ps -ef listing?

Hi All, Could you please help to resolve my following issues: Problem Description: Suppose my user name is "MI90". i.e. $USER = MI90 when i run below command, i get all the processes running on the system containing name MQ. ps -ef | grep MQ But sometimes it lists... (8 Replies)
Discussion started by: KDMishra
8 Replies

3. Shell Programming and Scripting

listing files

Hi Guys, I need to list out the files which are not ending with particular extension in ksh but the extension can come within the file name. Please help me.. Thanks (2 Replies)
Discussion started by: jesu
2 Replies

4. Red Hat

Showing all users in 'users' and 'top' commands

Hi All, I work in a multi user environment where my school uses Red Hat Linux server. When I issue commands such as "top" or "users", I get to see what others are doing and what kinds of applications they are running (even ps -aux will give such information). "users" will let me know who else is... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies

5. Solaris

To restrict the users not to change the passwords for NIS users

Hi All, How to restrict the NIS users not to change their passwords in for NIS users?? and my NIS user is unable to login to at client location what could be the problem for this ? Any body can help me. Thanks in advance. (1 Reply)
Discussion started by: Sharath Kumar
1 Replies

6. HP-UX

Limiting SFTP Users While Not Limiting Regular Users?

Hi, I have searched the web and have come back with nothing that is satisfactory for what I require. SFTP is my corporations new file transfer standard. What I require is a method to lock down SFTP users to their directory (they may go to sub directories) while not restricting regular users. ... (2 Replies)
Discussion started by: Emancipator
2 Replies

7. Shell Programming and Scripting

listing of users

how to know who all users have logged in and logged out in last 15 minutes through shell programming (1 Reply)
Discussion started by: sarita
1 Replies

8. UNIX for Dummies Questions & Answers

IP and VIP listing

Its been some time since I've logged on to a Unix system and I've forgotten the command which I need to use to obtain: a list of IPs and VIPs for the host server I've logged on to. What is this command? By the way, what command will yield a display of the IP addresses given a host name? (1 Reply)
Discussion started by: ivanachukapawn
1 Replies

9. Linux

listing users and groups

RH 7.2 I'm trying to list the users & groups on my machine. I found the lsuser & lsgroup commands but no associated man pages. I typed: lsuser I get --> Valid options are: -a So I typed: lsuser -a I get --> Valid options are: groups, home So I typed: lsuser -a groups I get -->... (2 Replies)
Discussion started by: jalburger
2 Replies

10. UNIX for Dummies Questions & Answers

Recursive directory listing without listing files

Does any one know how to get a recursive directory listing in long format (showing owner, group, permission etc) without listing the files contained in the directories. The following command also shows the files but I only want to see the directories. ls -lrtR * (4 Replies)
Discussion started by: psingh
4 Replies
Login or Register to Ask a Question