09-26-2007
Your question is unclear, do you need t ofind out all users currently logged on the server ? If yes, "who" command will give you this, you can also use "finger", it will report like :
Quote:
Login Name Tty Idle Login Time Where
root root pts/0 - Wed 03:25 10.10.1.1
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. Shell Programming and Scripting
Hello,
i know who command gives you the time when particular user logged in. And subtracting today's date and time from the one found in who we can get how much time user logged in. But this can get very much clumsy as we can't subtract date directly in unix . Is there any other way or command... (4 Replies)
Discussion started by: salman4u
4 Replies
5. HP-UX
Hi
please suggest .. how can i get my original user from which logged in to another server.
my main current login is
$whoami
nitin
ssh nit01@n01
i m going (redirected)to log in below path..
nit01@n01:/home/n01 -> pwd
/home/n01
nit01@n01:/home/n01 ->
on this server i want get... (1 Reply)
Discussion started by: nitindreamz
1 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
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? (3 Replies)
Discussion started by: nishrestha
3 Replies
10. 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
FINGER(1) General Commands Manual FINGER(1)
NAME
finger - user information lookup program
SYNOPSIS
finger [ -lmsp ] [user [@host] ...]
DESCRIPTION
The finger command has two basic output formats providing essentially the same information.
The -s option of finger displays the user's login name, real name, terminal name and write status (as a ``*'' after the terminal name if
write permission is denied), idle time, login time, office location and office phone number.
Idle time is in minutes if it is a single integer, hours and minutes if a ``:'' is present, or days if a ``d'' is present. Login time is
displayed as month, day, hours and minutes, unless more than six months ago, in which case the year is displayed rather than the hours and
minutes.
Unknown devices as well as nonexistent idle and login times are displayed as single asterisks.
The -l option produces a multi-line format displaying all of the information described for the -s option as well as the user's home direc-
tory, home phone number, login shell, and the contents of the files ``.plan'' and ``.project'' from the user's home directory.
If idle time is at least a minute and less than a day, it is presented in the form ``hh:mm''. Idle times greater than a day are presented
as ``d day[s] hh:mm''.
Phone numbers specified as eleven digits are printed as ``+N-NNN-NNN-NNNN''. Numbers specified as ten or seven digits are printed as the
appropriate subset of that string. Numbers specified as five digits are printed as ``xN-NNNN''.
If write permission is denied to the device, the phrase ``(messages off)'' is appended to the line containing the device name. One entry
per user is displayed with the -l option; if a user is logged on multiple times, terminal information is repeated once per login.
The -p option prevents the -l option of finger from displaying the contents of the ``.plan'' and ``.project'' files.
Note that some fields may be missing, in either format, if information is not available for them.
If no operands are specified, finger will print an entry for each user currently logged into the system. If no options are specified, fin-
ger defaults to the -l style output if operands are provided, otherwise to the -s style.
User is usually a login name; however, matching will also be done on the users' real names, unless the -m option is supplied. All name
matching performed by finger is case insensitive.
Finger may be used to look up users on a remote machine. The format is to specify a user as ``user@host'', or ``@host'', where the default
output format for the former is the -l style, and the default output format for the latter is the -s style. The -l option is the only
option that may be passed to a remote machine.
SEE ALSO
chpass(1), w(1), who(1), getpwent(3)
4th Berkeley Distribution May 18, 1989 FINGER(1)