10-22-2011
current logged in user
Hey guys
I need a script that reads a login name and verifies if that user is currently logged in
i have found few commands like "who" and "users"
but i wonder how can i verify it that login name is logged in or not?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How can i check to see if a user is logged on to the network? (1 Reply)
Discussion started by: provo
1 Replies
2. Shell Programming and Scripting
Hi,
What commands do i need to check if a user is logged on to the network?
thanks. (1 Reply)
Discussion started by: provo
1 Replies
3. UNIX for Advanced & Expert Users
Hi
I am using mailx to send email and am wondering if there is a way I can send the email from a different user than the user logged in.
something like do-not-reply@xyz.com
Thank you. (1 Reply)
Discussion started by: rakeshou
1 Replies
4. Red Hat
I have 2 systems. (1) RHEL5 and (2) winXP pro
from xpPRO putty i ssh into rhel5 : user root
from xpPRO i ftp into rhel5 : user abc123
when i run #uptime it only shows 1 user
when i do #ps -u abc123 : it shows vsftpd deamon PID
is there a command that can be used to show all currently... (4 Replies)
Discussion started by: dplinux
4 Replies
5. Shell Programming and Scripting
Ok, so, in order to install some dependencies of a program I made, a script has to be run as root. The thing is that I have to copy some things into the home folder of currently logged in user, but the variable $HOME returns '/root' and the $USER returns 'root' :(
Is there any way to see who is... (7 Replies)
Discussion started by: hakermania
7 Replies
6. Shell Programming and Scripting
Hi, first time poster, newbie to Bash. I'm looking to get the username of the user who's been logged into a computer the most / longest.
I am new to Bash but am familiar with other scripting languages, mainly PHP. So I have a general idea about how to go about the script logic, but don't know... (13 Replies)
Discussion started by: Panman82
13 Replies
7. Shell Programming and Scripting
Suppose user 'asdf' is not logged into server 'bbbb', but the server is up. User 'asdf' has cron job. Will it be executed? (1 Reply)
Discussion started by: thulasidharan2k
1 Replies
8. Red Hat
How do I confirm if a user logged in, is remote or local? In the case if the user is remote, how to be sure what authentication/method is it using, like LDAP, NIS or other? (2 Replies)
Discussion started by: kirtikjr
2 Replies
9. Shell Programming and Scripting
hi!
How can I find into:
/var/log/messages.4
/var/log/messages.3
/var/log/messages.2
/var/log/messages.1
/var/log/messages
The last user do a login? (for example user1)
My idea is to search by the pattern "Accepted password for" buy I necessary search into all files first and in the... (2 Replies)
Discussion started by: guif
2 Replies
10. Homework & Coursework Questions
1. The problem statement, all variables and given/known data:
Show all users who are currently logged in, sorted from earliest to latest log in time. The log in time includes the month, day, and time.
2. Relevant commands, code, scripts, algorithms:
finger, who, sort, pipe, head, tail,
... (8 Replies)
Discussion started by: vtmd
8 Replies
rwho(1) General Commands Manual rwho(1)
NAME
rwho - show who is logged in on local machines
SYNOPSIS
DESCRIPTION
produces output similar to the output of the HP-UX command for all machines on the local network that are running the daemon (see who(1)
and rwhod(1M)). If has not received a report from a machine for 11 minutes, assumes the machine is down and does not report users last
known to be logged into that machine.
output line has fields for the name of the user, the name of the machine, the user's terminal line, the time the user logged in, and the
amount of time the user has been idle. Idle time is shown as:
If a user has not typed to the system for a minute or more, reports this as idle time. If a user has not typed to the system for an hour
or more, the user is omitted from output unless the flag is given.
An example output line from would look similar to:
This output line could be interpreted as is logged into and his terminal line is has been logged on since September 12 at 13:28 (1:28
p.m.). has not typed anything into for 11 minutes.
WARNINGS
output becomes unwieldy when the number of users for each machine on the local network running becomes large. One line of output occurs
for each user on each machine on the local network that is running
AUTHOR
was developed by the University of California, Berkeley.
FILES
Information about other machines.
SEE ALSO
ruptime(1), rusers(1), rwhod(1M).
rwho(1)