Sponsored Content
Operating Systems Solaris List all inactive users who has not logged on since last 90 days Post 302218317 by haridham on Friday 25th of July 2008 12:47:29 AM
Old 07-25-2008
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!
 

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
PAM_LASTLOG(8)							 Linux-PAM Manual						    PAM_LASTLOG(8)

NAME
pam_lastlog - PAM module to display date of last login and perform inactive account lock out SYNOPSIS
pam_lastlog.so [debug] [silent] [never] [nodate] [nohost] [noterm] [nowtmp] [noupdate] [showfailed] [inactive=<days>] DESCRIPTION
pam_lastlog is a PAM module to display a line of information about the last login of the user. In addition, the module maintains the /var/log/lastlog file. Some applications may perform this function themselves. In such cases, this module is not necessary. If the module is called in the auth or account phase, the accounts that were not used recently enough will be disallowed to log in. The check is not performed for the root account so the root is never locked out. OPTIONS
debug Print debug information. silent Don't inform the user about any previous login, just update the /var/log/lastlog file. never If the /var/log/lastlog file does not contain any old entries for the user, indicate that the user has never previously logged in with a welcome message. nodate Don't display the date of the last login. noterm Don't display the terminal name on which the last login was attempted. nohost Don't indicate from which host the last login was attempted. nowtmp Don't update the wtmp entry. noupdate Don't update any file. showfailed Display number of failed login attempts and the date of the last failed attempt from btmp. The date is not displayed when nodate is specified. inactive=<days> This option is specific for the auth or account phase. It specifies the number of days after the last login of the user when the user will be locked out by the module. The default value is 90. MODULE TYPES PROVIDED
The auth and account module type allows to lock out users which did not login recently enough. The session module type is provided for displaying the information about the last login and/or updating the lastlog and wtmp files. RETURN VALUES
PAM_SUCCESS Everything was successful. PAM_SERVICE_ERR Internal service module error. PAM_USER_UNKNOWN User not known. PAM_AUTH_ERR User locked out in the auth or account phase due to inactivity. PAM_IGNORE There was an error during reading the lastlog file in the auth or account phase and thus inactivity of the user cannot be determined. EXAMPLES
Add the following line to /etc/pam.d/login to display the last login time of an user: session required pam_lastlog.so nowtmp To reject the user if he did not login during the previous 50 days the following line can be used: auth required pam_lastlog.so inactive=50 FILES
/var/log/lastlog Lastlog logging file SEE ALSO
pam.conf(5), pam.d(5), pam(8) AUTHOR
pam_lastlog was written by Andrew G. Morgan <morgan@kernel.org>. Inactive account lock out added by Toma Mraz <tm@t8m.info>. Linux-PAM Manual 09/19/2013 PAM_LASTLOG(8)
All times are GMT -4. The time now is 09:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy