Operating System - HP-UX
1752729 Members
5509 Online
108789 Solutions
New Discussion юеВ

Re: Inactive users more than 60 days

 
SOLVED
Go to solution
Amit Manna_6
Regular Advisor

Inactive users more than 60 days

Hi,

Can anybody tell me how to find out the inactive users on the system for more than 60 days.

Means they have not logged into the system for than 60 days.


Thanks and Regards,

Amit Manna
7 REPLIES 7
Naveej.K.A
Honored Contributor

Re: Inactive users more than 60 days

hi amit,

finger -i username

should give you the idle time....

with best wishes
naveej
practice makes a man perfect!!!
Sanjay Kumar Suri
Honored Contributor

Re: Inactive users more than 60 days

$last|grep user_name

will give some output which can then be used in some shell script to meet your need.

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Joseph Loo
Honored Contributor
Solution

Re: Inactive users more than 60 days

hi,

please refer to this post:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=150881

i believe it has some scripts which u may use.

your previous post ask about trusted system, where there are parameters which u could set on user inactivity.

regards.
what you do not see does not mean you should not believe
Bruno Ganino
Honored Contributor

Re: Inactive users more than 60 days

Amit, look..... interesting
http://www.darkwing.com/idled/README.html
Bruno
Torino (Turin) +2H
Geoff Wild
Honored Contributor

Re: Inactive users more than 60 days

finger will do:

for i in `cat /etc/passwd |awk -F: '{print $1}'`
do
finger $i
done

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Peter Gillis
Super Advisor

Re: Inactive users more than 60 days

Amit

Assuming that all users have to access the .profile file when logging in, you could try something like:
find /home \( -name ".profile" \) -atime +60 -print

This lists the .profile files in /home directory that have not been accessed within the last 60 days.

Regards,
Maria.
Geoff Wild
Honored Contributor

Re: Inactive users more than 60 days

Amit - as part of good forum ettiquette - it is nice to assign points to those who help you:

http://forums1.itrc.hp.com/service/forums/publicProfile.do?userId=CA760979&forumId=1

I have assigned points to 14 of 140 responses to my questions.

Thanks...Geoff

PS - it is allright to assign 0 points as well for answer that don't help - IE assign me 0 points for this post.

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.