Sponsored Content
Full Discussion: logoff idle user script
Top Forums UNIX for Dummies Questions & Answers logoff idle user script Post 21070 by thehoghunter on Thursday 9th of May 2002 05:21:13 PM
Old 05-09-2002
And personnally, I would go with
who -u |awk '{print $1" "$6}'
to get both the idle time and who it belongs to.

Be careful of duplicate sign-ons, root account, cron jobs, ....
thehoghunter
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

logoff ghost user

I just noticed by running a who command that I was logged in twice . So two admin2 are on the list. (solaris 2.6) Since I telnet using a windows 98, I suppose that I forgot to CTRL-D last time I logged in and clicked on hangup. In such a case, how can I loggoff the old ghost loggin ? It's not a... (4 Replies)
Discussion started by: phpote
4 Replies

2. AIX

Logoff a user...

Hi... could anyone tell me how to kill a user session on my server with out affecting other user? Bala (6 Replies)
Discussion started by: balaji_prk
6 Replies

3. UNIX for Advanced & Expert Users

Running a script during logoff

I know we can put whatever we need to run during login inside /etc/profile or .profile file. I want to run a set of commands before logoff. Where should I put my commands/scripts? Is such facility available? (3 Replies)
Discussion started by: praveenkumar_l
3 Replies

4. Shell Programming and Scripting

User Idle Time

Does anyone know how do you determine the user idle time of stdin in order to log the user out for being idle too long. I would like to write a c program to do this but I it is not clear upon how to determine idle time from keyboard input. (9 Replies)
Discussion started by: cpaquette
9 Replies

5. UNIX for Dummies Questions & Answers

determine if user is truly idle

I have a problem. I made a script (that I am very proud of - never scripted before) that kills off idle sessions based on who -u. The problem is it is killing sessions that aren't truly idle. who -u reports them as being idle for 7 hours, when in reality they have been using a program for that... (5 Replies)
Discussion started by: raidzero
5 Replies

6. AIX

Track user logoff in AIX 5.3

Hi Does anybody know if there is a way in AIX 5.3 to track how a user was logged off? For instance where the user typed exit, hit crtl D, shell process was killed, etc. I know of the last log entries but this just shows a users login time and duration. I also tried syslog but I only get login... (5 Replies)
Discussion started by: kimyo
5 Replies

7. Shell Programming and Scripting

Logon/Logoff script

I need help for writing a logon/logoff script for recording user's computer usage time. This is for local login only, not for ssh or something like that. When a user logon, there should be a temp file (/home/acct/login_temp) generated including the logname and logon time information in the... (8 Replies)
Discussion started by: jimx
8 Replies

8. Shell Programming and Scripting

Write a scripts to kill idle user for 60 min. & email user list to admin in text file

Folks, I have written one script for following condition by referring some of online post in this forum. Please correct it if I'm missing something in it. (OS: AIX 5.3) List the idle user. (I used whoidle command to list first 15 user and get username, idle time, pid and login time).... (4 Replies)
Discussion started by: sumit30
4 Replies

9. Shell Programming and Scripting

Case Statement for Login/Logoff Script

I'm currently trying to write a login script. I have already written a logoff script that uses an if/else statement. #!/bin/bash TIMED=$(date +%H) if ' then echo Have a Great Day $USER else echo Have a Great Night $USER fi But I'd like to write one that give me the option of... (1 Reply)
Discussion started by: bbowers
1 Replies

10. Shell Programming and Scripting

My script stops after logoff...why??

Hi' i am runing a script thats run with a loop...while loop true. when i exit the server..logon and again the script doenst run. its a bash script test.sh. i run it as: #./test.sh & what can be the priblem please? thanks alot (6 Replies)
Discussion started by: zigizag
6 Replies
ATRUN(8)						    BSD System Manager's Manual 						  ATRUN(8)

NAME
atrun -- run jobs queued for later execution SYNOPSIS
atrun [-l load_avg] [-d] DESCRIPTION
atrun runs jobs queued by at(1). Root's crontab(5) must contain the line: */10 * * * * root /usr/libexec/atrun so that atrun(8) gets called every ten minutes. At every invocation, every job in lowercase queues whose starting time has passed is started. A maximum of one batch job (denoted by upper- case queues) is started each time atrun is invoked. OPTIONS
-l load_avg Specifies a limiting load factor, over which batch jobs should not be run, instead of the compiled-in value of 1.5. -d Debug; print error messages to standard error instead of using syslog(3). WARNINGS
For atrun to work, you have to start up a cron(8) daemon. FILES
/var/at/spool Directory containing output spool files /var/at/jobs Directory containing job files SEE ALSO
at(1), crontab(1), syslog(3), crontab(5), cron(8) AUTHORS
Thomas Koenig <ig25@rz.uni-karlsruhe.de> BUGS
The functionality of atrun should be merged into cron(8). BSD
April 12, 1995 BSD
All times are GMT -4. The time now is 04:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy