Sponsored Content
Operating Systems Solaris List all inactive users who has not logged on since last 90 days Post 302218543 by jhtrice on Friday 25th of July 2008 12:09:52 PM
Old 07-25-2008
Last login

In some environments finger won't give you the last login correctly.
Depending on how your users are set up you might look at the access times of files like .bash_history .profile .bashrc in their home directories.
It's not perfect but it may help and using find makes it easy.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to logout inactive users????

I would like to automatically logout from the system inactive users depending on their functions. For example there are users that I would like to logout after 15 minutes of inactivity, but there are others that I would like to logout after 30 minutes of inactivity. It's possible to do this??? (6 Replies)
Discussion started by: rrivas
6 Replies

2. Shell Programming and Scripting

Trying to get list of logged on users sorted

I'm trying to execute a single shell command that will give me a sorted list of all the users currently logged into the system, displaying the users name as it appears in /etc/passwd. I've tried awk -F: '{print $1}' /etc/passwd | xargs finger -s | cut -c11-28 | uniq This list whoever does... (7 Replies)
Discussion started by: kungfuice
7 Replies

3. UNIX for Dummies Questions & Answers

Make an account inactive after 90 days.

Is this possible? Say I create an account today and in 90 days I want it to be turned off. Is this sort of thing possible using the built in components of a Unix system? (Using Solaris 9) I see things about password expires, but what if the person changes his password on the 89th day,... (1 Reply)
Discussion started by: LordJezo
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. UNIX for Dummies Questions & Answers

How to do a login time and date list of users never logged on?

Hello, I'm trying to do a list of user that never connected to a couple of servers. I want to do a diff between the servers lists, and print out only the users that never has logged on each server. Here my first step : SERVER01: # finger `egrep -v -e "^\s*#" /etc/passwd | awk '{ print $1 }' |... (4 Replies)
Discussion started by: gogol_bordello
4 Replies

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

7. Shell Programming and Scripting

Users not logged in for last 90 days

Hi, How to find the users who did not login into a UNIX box (thru ssh/ftp or any other way) for last 90 days? I think of using "finger" or "last" command to findout each user's last login and then find number of days between today and that day. Is there any other better way or anyone prepared... (1 Reply)
Discussion started by: reddyr
1 Replies

8. Shell Programming and Scripting

(RHEL, Bash) List users and check if they have logged on during the last 2 months

Hi everyone, At work we were told to check the list of users of an application server and delete all those that have left the company or don't need access to the application anymore. Here's what I came up with. Would you be as kind as to tell me your opinion and whether there is a faster / easier... (4 Replies)
Discussion started by: gacanepa
4 Replies

9. Shell Programming and Scripting

How to show a list of currently logged in and logging out users?

Hi Guys! I am sure that this question might appeared previously, but I still don't know how to show a list of logged out users. Please help with this! Thanks in advance:) (5 Replies)
Discussion started by: saloliubliu
5 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 [-46glmpshoT] [user ...] [user@host ...] DESCRIPTION
The finger utility displays information about the system users. Options are: -4 Forces finger to use IPv4 addresses only. -6 Forces finger to use IPv6 addresses only. -s Display the user's login name, real name, terminal name and write status (as a ``*'' before the terminal name if write permission is denied), idle time, login time, and either office location and office phone number, or the remote host. If -o is given, the office location and office phone number is printed (the default). If -h is given, the remote host is printed instead. 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. If it is an ``*'', the login time indicates the time of last login. Login time is displayed as the day name if less than 6 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. Unknown devices as well as nonexistent idle and login times are displayed as single asterisks. -h When used in conjunction with the -s option, the name of the remote host is displayed instead of the office location and office phone. -o When used in conjunction with the -s option, the office location and office phone information is displayed instead of the name of the remote host. -g This option restricts the gecos output to only the users' real name. It also has the side-effect of restricting the output of the remote host when used in conjunction with the -h option. -l Produce a multi-line format displaying all of the information described for the -s option as well as the user's home directory, home phone number, login shell, mail status, and the contents of the files .forward, .plan, .project and .pubkey 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. -p Prevent the -l option of finger from displaying the contents of the .forward, .plan, .project and .pubkey files. -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. -T Disable the piggybacking of data on the initial connection request. This option is needed to finger hosts with a broken TCP imple- mentation. 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. If no arguments are specified, finger will print an entry for each user currently logged into the system. The finger utility 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. If the file .nofinger exists in the user's home directory, finger behaves as if the user in question does not exist. The optional finger.conf(5) configuration file can be used to specify aliases. Since finger is invoked by fingerd(8), aliases will work for both local and network queries. ENVIRONMENT
The finger utility utilizes the following environment variable, if it exists: FINGER This variable may be set with favored options to finger. FILES
/etc/finger.conf alias definition data base /var/log/lastlog last login data base SEE ALSO
chpass(1), w(1), who(1), finger.conf(5), fingerd(8) D. Zimmerman, The Finger User Information Protocol, RFC 1288, December, 1991. HISTORY
The finger command appeared in 3.0BSD. BUGS
The current FINGER protocol RFC requires that the client keep the connection fully open until the server closes. This prevents the use of the optimal three-packet T/TCP exchange. (Servers which depend on this requirement are bogus but have nonetheless been observed in the Internet at large.) BSD
July 22, 2002 BSD
All times are GMT -4. The time now is 02:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy