Sponsored Content
Top Forums Shell Programming and Scripting Users not logged in for last 90 days Post 302505590 by jim mcnamara on Thursday 17th of March 2011 10:55:38 AM
Old 03-17-2011
There are files (depending on the age of your OS and flavor of UNIX)
in /var/adm:
utmp, wtmp, or utmpx

These files have login information. Start with man utmpx. Most of the man pages come with a bit of sample C code to search the files.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Information about users who have logged.

Hi, Suppose I have a programme called Menu. This menu has various choices as we would expect from a Menu. Now Can you Please help me as I want the details of the Users to be registered to some file , Whoever has entered this particular Program . Basically to see the username and the time that... (2 Replies)
Discussion started by: rooh
2 Replies

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

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. UNIX for Dummies Questions & Answers

List all inactive users who has not logged on since last 90 days

Hi, Can I get a script to list out all the users, who has not logged on since last 90 days. Last command in not working due due to /var/adm/wtmpx is more than 2 GB. Thanks in advance. Regards, Roni (10 Replies)
Discussion started by: manasranjanpand
10 Replies

5. Solaris

List all inactive users who has not logged on since last 90 days

I need actuall script which List all inactive users who has not logged on since last 90 days Thanks in advance. Di! (17 Replies)
Discussion started by: haridham
17 Replies

6. UNIX for Dummies Questions & Answers

How many time have user logged last X days?

Hi all.. I was trying to do a little shell script, that would list users and their login times, lets say like last 5 days. But I couldnt figure out how to count users login times from previous days. Any tips? Funny that nobody has do this kinda script before, or atleast I couldnt find on... (2 Replies)
Discussion started by: Kimmo_
2 Replies

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

8. Programming

Get the list of logged in users

How can I get the list of logged in users in the system programmatically? I can get the list with 'who' or 'users' commands but I need to get the list programmatically... May someone help, please? Thanks in advance. (2 Replies)
Discussion started by: xyzt
2 Replies

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

10. 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
FINGER(1)						    BSD General Commands Manual 						 FINGER(1)

NAME
finger -- user information lookup program SYNOPSIS
finger [-hlMmops] [user ...] finger [-l] [user@host ...] DESCRIPTION
The finger utility displays information about local and remote system users. By default, the following information is displayed about each user currently logged-in to the local host: o login name o user's full name o associated terminal name o idle time o login time o from where 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 dis- played as the day name if less than six days, else month, day, hours and minutes, unless more than six months ago, in which case the year is displayed rather than the hours and minutes. The names of terminals for which write permission is denied (see mesg(1)) are prepended with an asterisk ('*'). Unknown devices as well as nonexistent idle and login times are displayed as single asterisks. The options are as follows: -h If the -s option is also specified, the name of the remote host is displayed instead of the office location and office phone. -l Long format. Produces a multi-line format displaying all of the information available from the -s option as well as the user's home directory, home phone number, login shell, mail status, and the contents of the ``.plan'' and ``.project'' files 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 pre- sented 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''. Numbers specified as four dig- its are printed as ``xNNNN''. 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. Mail status is shown as ``No Mail.'' if there is no mail at all, ``Mail last read DDD MMM ## HH:MM YYYY (TZ)'' if the person has looked at their mailbox since new mail arriving, or ``New mail received ...'', ``Unread since ...'' if they have new mail. -M Enable matching of user names. This is disabled by default on systems running YP or with large password databases. -m Prevent matching of user names. 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. -o If the -s option is also specified, the office location and office phone is displayed instead of the name of the remote host. -p Prevents the -l option of finger from displaying the contents of the ``.plan'' and ``.project'' files. -s Short format (default). The information as described above is displayed in a columnar fashion. If no options are specified, finger defaults to the -l style output if operands are provided, otherwise to the -s style. Note that some fields may be missing, in either format, if information is not available for them. 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
chfn(1), w(1), who(1), fingerd(8) HISTORY
The finger command appeared in 3.0BSD. BSD
July 27, 1991 BSD
All times are GMT -4. The time now is 11:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy