07-22-2006
Logins-logouts
I want a script that checks the logins and logouts in a system.Is there a way to keep the logins and logouts in files and then compare them every e.g. 10 seconds?
for tcsh.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Could someone please tell me what I would have to do so I can dial in to Solaris through a modem and login?
Thanks in advance.
Jomar (2 Replies)
Discussion started by: crispyco
2 Replies
2. UNIX for Dummies Questions & Answers
Hello again!
Another thing came up the other day. I've noticed that a few of my "beloved" users who by the way, use NVT (Novell Virtual Terminal) to log in the server, when told to log off, press the power button to shut down their computer, instead of logging off as they should. As a result... (2 Replies)
Discussion started by: pappous
2 Replies
3. AIX
Trying to limit 1 login per account...
Setup:
We have 2 auth logins, one to the AIX (telnet)then into a distribution mgmt software, the users do not have a shell to log into on the AIX itself, so placing a script such as:
active=`who | awk '{printf",%s,\n",$1}' | grep ,$LOGNAME, | wc -l`
... (0 Replies)
Discussion started by: pheusion
0 Replies
4. Shell Programming and Scripting
This is the contents of my file:
donald.duck 12/07/2009 12:07:58
donald.duck 12/07/2009 12:17:36
donald.duck 12/07/2009 12:22:29
donald.duck 12/07/2009 12:26:39
donald.duck 12/07/2009 12:28:01
mickey.mouse 12/07/2009 12:48:49
mickey.mouse 12/07/2009 12:49:33
mickey.mouse 12/07/2009... (3 Replies)
Discussion started by: diallo0024
3 Replies
5. Shell Programming and Scripting
I have put in the "script" command in the .profile of a particular user id that tracks the terminal session when the user id logs in.
But when the user logs on to the server using FTP, how can this be tracked?
Any input will be appreciated. (1 Reply)
Discussion started by: ggayathri
1 Replies
6. AIX
I want to know how I can turn off and turn on login logging. We have a server that appears to have stopped logging user logins. Running the who command shows nothing and the last command shows no logins for a month. The var/adm/wtmp file isn't full and there is plenty of space in the var file... (2 Replies)
Discussion started by: daveisme
2 Replies
7. Shell Programming and Scripting
Hi, all
I want to make a bash script that print all users from a system using last command.
I want to print the number of user's login in the format (descending order):
5 user1 address1
4 user2 address2
I am trying the command
last | awk '{print $1 " " $3}' | sort | uniq
... (9 Replies)
Discussion started by: peter20
9 Replies
8. AIX
Hi,
How difficult would it be to configure an alert on AIX that will inform me every time someone logs into the system? (1 Reply)
Discussion started by: bbbngowc
1 Replies
9. Solaris
Is the below logins are needed in the machine.....
nuucp , uucp ,smmsp , svctag , listen , webservd , ip ( We are not using printers),
Can you help in these?
Regards,
kumar (3 Replies)
Discussion started by: rajeshkumarvg
3 Replies
UTMP(5) File Formats Manual UTMP(5)
NAME
utmp, wtmp - logged in users, login and logout history
SYNOPSIS
#include <sys/types.h>
#include <utmp.h>
DESCRIPTION
The files /etc/utmp and /usr/adm/wtmp respectively contain the currently logged in users, and the history of logins and logouts.
Each file is an array of the following structure defined in <utmp.h>:
struct utmp {
char ut_user[8]; /* user name */
char ut_line[12]; /* terminal name */
char ut_host[16]; /* host name, when remote */
time_t ut_time; /* login/logout time */
};
#define ut_name ut_user/* for compatibility with other systems */
The structure contains more fields than those listed, but they are only of interest to init and login. Note that the ut_name field is a
compatibility alias for ut_user, it is actually better to use it.
A login entry is completely specified. A logout entry has a null string for ut_name. A shutdown or reboot entry has an ut_line field con-
taining a "~" (tilde). The ut_name field is usually the name of the program that did the shutdown, or "reboot" at reboot. This is a bit
confusing, but note that there should always be two such entries. If you see just one entry then the system has crashed, if you see two
entries then the system was properly shut down and later rebooted.
FILES
/etc/utmp Currently logged in users.
/usr/adm/wtmp History of logins and logouts.
SEE ALSO
who(1), ttyslot(3).
AUTHOR
Kees J. Bot (kjb@cs.vu.nl)
UTMP(5)