Sponsored Content
Top Forums UNIX for Dummies Questions & Answers how to find top 3 users currently logged on Post 302443981 by whyatepies on Tuesday 10th of August 2010 02:58:56 PM
Old 08-10-2010
how to find top 3 users currently logged on

For the first 3 users only that are currently logged in output their effective user id.

thank you.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how many users logged

in unix what is the syntax to find out how many users are currently logged in (4 Replies)
Discussion started by: trichyselva
4 Replies

2. Shell Programming and Scripting

to find the number of users logged in

Hi, can u say to display the number of users that logged before me. thanks (10 Replies)
Discussion started by: shanshine
10 Replies

3. Post Here to Contact Site Administrators and Moderators

logged out users

how to find out users who logged out within 5 minutes (1 Reply)
Discussion started by: roshni
1 Replies

4. AIX

How to find the top 6 users (which consume most space)?

Hi everybody, I want to know if there is any posibility to find out - on an AIX system - which are the the users who consume most space or at least a posibility to obtain a list with all the users and how much space are they consuming ? Trying to use du command was useless. Any idea?... (5 Replies)
Discussion started by: RebelDac
5 Replies

5. Shell Programming and Scripting

Users Not Logged in

I have searched the forums but have not mangaed to quite find what im looking for. I have used to /etc/passwd command to present me a list of all users the who command to present all users currently logged on, but what i want to know is what command can i use to display users that are registered... (12 Replies)
Discussion started by: warlock129
12 Replies

6. UNIX for Dummies Questions & Answers

How many users are logged in?

How do I find this out? I have a feeling its a simple command such as who, but I just don't know what it is. I've had a search on here but either I can't put it into the right search criteria or there isn't a topic on it. Thanks. EDIT: Delete this thread, as I posted it I noticed the... (0 Replies)
Discussion started by: chris_rabz
0 Replies

7. Shell Programming and Scripting

find top 4 users currently logged on can i use grep

For the first 4 users only that are currently logged in output their effective user id. It's not important the order in which each logged in i just want to have the top 4. Same question as here...... (0 Replies)
Discussion started by: whyatepies
0 Replies

8. 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

9. Shell Programming and Scripting

Script to find users not logged in for 90 days

Dear All, I need your help in finding out users not logged in to linux system for more than 90 days. I found a script from our forum i am getting error while using that. from the code i have debugged line by line to see where i am getting the problem. i found out the below line i am getting... (5 Replies)
Discussion started by: Sachinlinux
5 Replies
SETREUID(2)						     Linux Programmer's Manual						       SETREUID(2)

NAME
setreuid, setregid - set real and/or effective user or group ID SYNOPSIS
#include <sys/types.h> #include <unistd.h> int setreuid(uid_t ruid, uid_t euid); int setregid(gid_t rgid, gid_t egid); DESCRIPTION
setreuid sets real and effective user IDs of the current process. Unprivileged users may only set the real user ID to the real user ID or the effective user ID, and may only set the effective user ID to the real user ID, the effective user ID or the saved user ID. Supplying a value of -1 for either the real or effective user ID forces the system to leave that ID unchanged. If the real user ID is set or the effective user ID is set to a value not equal to the previous real user ID, the saved user ID will be set to the new effective user ID. Completely analogously, setregid sets real and effective group ID's of the current process, and all of the above holds with "group" instead of "user". RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is set appropriately. ERRORS
EPERM The current process is not the super-user and changes other than (i) swapping the effective user (group) ID with the real user (group) ID, or (ii) setting one to the value of the other or (iii) setting the effective user (group) ID to the value of the saved user (group) ID was specified. NOTES
Setting the effective user (group) ID to the saved user ID is possible since Linux 1.1.37 (1.1.38). CONFORMING TO
BSD 4.3 (the setreuid and setregid function calls first appeared in 4.2BSD). SEE ALSO
getuid(2), getgid(2), setuid(2), setgid(2), seteuid(2), setresuid(2) Linux 1.1.38 1994-08-02 SETREUID(2)
All times are GMT -4. The time now is 09:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy