for sakes of argument if you do a "w" and get the list of users loged in (which reflects from /var/adm/wtmp) and you noticed that there are no process running you can just wipe out that file but in that process you would also lose anyinfo for anyone logged in. you can also use the last command to see if it is actually still logged in (if it is it should most deffinetly have a PID.)
if it is showing up it has to have a pid zommbied or not.
Will someone please share a script with me that will read in each line of the who -u output and if idle time is more than 50 min, execute a kill on the PID? This is what I have so far:
who -u | cut -c 40-56
I am comfortable in the korn shell, but I can broaden my horizons if you've got... (4 Replies)
I have run across an issue with the last two Dell Poweredge servers I have attempted to deploy. I seems that when a telnet session sits idle for 5 to 30 minutes (seems random) the session is being closed and users are logged off. If the session has user activity there is no problem staying... (0 Replies)
i am new to unix shell program,
please someone hint me how to get the names of users who make logouts in last 4 minutes?
i dont need complete script, but only the guide (2 Replies)
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)
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)
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)
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)
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)
Hello All,
I have installed VNC Server on Ubuntu system to access this system from windows machine i'm using VNC Viewer.
When i logged off the server from windows machine through VNC Viewer its showing blank screen only...
Kindly help.
Regards,
Purushottam Aher (0 Replies)
Discussion started by: purushottamaher
0 Replies
LEARN ABOUT REDHAT
wtmpx
utmpx(4) File Formats utmpx(4)NAME
utmpx, wtmpx - utmpx and wtmpx database entry formats
SYNOPSIS
#include <utmpx.h>
/var/adm/utmpx
/var/adm/wtmpx
DESCRIPTION
The utmpx and wtmpx files are extended database files that have superseded the obsolete utmp and wtmp database files.
The utmpx database contains user access and accounting information for commands such as who(1), write(1), and login(1). The wtmpx database
contains the history of user access and accounting information for the utmpx database.
USAGE
Applications should not access these databases directly, but should use the functions described on the getutxent(3C) manual page to inter-
act with the utmpx and wtmpx databases to ensure that they are maintained consistently.
FILES
/var/adm/utmpx user access and adminstration information
/var/adm/wtmpx history of user access and adminstrative information
SEE ALSO getutxent(3C), wait(3C)wait.h(3HEAD)SunOS 5.10 22 Feb 1999 utmpx(4)