Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

wtmp(4) [osf1 man page]

utmp(4) 						     Kernel Interfaces Manual							   utmp(4)

NAME
utmp, wtmp - Login records SYNOPSIS
#include <utmp.h> DESCRIPTION
The utmp file records information about who is currently using the system. The file is a sequence of utmp entries, as defined in struct utmp in the utmp.h file. The utmp structure gives the name of the special file associated with the user's terminal, the user's login name, and the time of the login in the form of time(3). The ut_type field is the type of entry, which can specify several symbolic constant values. The symbolic constants are defined in the utmp.h file. The wtmp file records all logins and logouts. A null user name indicates a logout on the associated terminal. A terminal referenced with a tilde (~) indicates that the system was rebooted at the indicated time. The adjacent pair of entries with terminal names referenced by a vertical bar (|) or a right brace (}) indicate the system-maintained time just before and just after a date command has changed the sys- tem's time frame. The wtmp file is maintained by login(1) and init(8). Neither of these programs creates the file, so, if it is removed, record keeping is turned off. See ac(8) for information on the file. FILES
RELATED INFORMATION
ac(8), init(8), last(8), lastcomm(8), login(1), who(1), wtmpconvert(8). delim off utmp(4)

Check Out this Related Man Page

utmp(5) 							File Formats Manual							   utmp(5)

Name
       utmp, wtmp - login records

Syntax
       #include <utmp.h>

Description
       The  file  records  information	about  who  is currently using the system.  The file is a sequence of entries with the following structure
       declared in the include file:
       struct utmp {
	       char    ut_line[8];	       /* tty name */
	       char    ut_name[8];	       /* user id */
	       char    ut_host[16];	       /* host name, if remote */
	       long    ut_time; 	       /* time on */
       };

       This structure gives the name of the special file associated with the user's terminal, the user's login name, and the time of the login	in
       the form of

       The  file  records  all	logins and logouts.  A null user name indicates a logout on the associated terminal.  A terminal referenced with a
       tilde (~) indicates that the system was rebooted at the indicated time.	The adjacent pair of entries with terminal names referenced  by  a
       vertical  bar  (|)  or  a right brace (}) indicate the system-maintained time just before and just after a command has changed the system's
       timeframe.

       The file is maintained by and Neither of these programs creates the file, so, if it is removed, record-keeping is turned off.  It is summa-
       rized by

Files
See Also
       last(1), lastcomm(1), login(1), who(1), ac(8), init(8)

																	   utmp(5)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Error login user file utmp

could probably help me with a unix problem. Basicallyu, when the users try to connect to the server they get this messge: No UTMP entry. you must exec "LOGIN" from the lowest level "sh" They are connecting using a windows emulator called TINYTERM. We cannot connect from the console either... (3 Replies)
Discussion started by: jernesto_diaz
3 Replies

2. SCO

SCO utmp file

I am tring to recover a SCO system remotely, when I try to login with multiple user support, i get the following message No UTPM entry, you must execute from the lowest level (sh) Can anyone shed some light on this issue. I have never came seen this error before. Also it will allow me to... (1 Reply)
Discussion started by: scott_williams1
1 Replies

3. Programming

utmp ACCOUNTING

the utmp.h ACCOUNTING macro is set to 9 on my system. my question is: what "accounting" is it referring to? (2 Replies)
Discussion started by: thmnetwork
2 Replies

4. AIX

utmp files

Hi All, if someone know where I can set dimension of utmp log files like wtmp failedlogin sulog in an AIX system. These are called security logs and they can reach a max amount in day or MB, where can I steady their size ? thanks in advance. (2 Replies)
Discussion started by: Carmen123
2 Replies

5. Shell Programming and Scripting

finding null records in data file

I am having a "|" delimited flat file and I have to pick up all the records with the 2nd field having null value. Please suggest. (3 Replies)
Discussion started by: dsravan
3 Replies

6. UNIX for Advanced & Expert Users

/etc/utmp file does not get updated with boot up details

In a frequent interval the system bootup is not updating the /etc/utmp file with the system boot details. This leads to blank output of who - b command. What can be the reason for the same? (1 Reply)
Discussion started by: jyoti_mil
1 Replies

7. AIX

Aix Server Restarted

Hi, I want to know how can we come to know who has system rebooted, I have given the command last but it showing the last user has login and logout after some time,but reboot command is showing after 10 mins,how can we trace that it is automatically rebooted or rebooted by some person, (2 Replies)
Discussion started by: manoj.solaris
2 Replies

8. Shell Programming and Scripting

Delete Duplicate records from a tilde delimited file

Hi All, I want to delete duplicate records from a tilde delimited file. Criteria is considering the first 2 fields, the combination of which has to be unique, below is a sample of records in the input file 1620000010338~2446694087~0~20061130220000~A00BCC1CT... (5 Replies)
Discussion started by: irshadm
5 Replies

9. SuSE

How to record shutdown/startup messages

The wtmp file records all logins and logouts. Its format is exactly like utmp except that a null user name indicates a logout on the associated terminal. Furthermore, the terminal name "~" with user name "shutdown" or "reboot" indicates a system shutdown or reboot and the pair of terminal names... (1 Reply)
Discussion started by: Laksmi
1 Replies

10. Red Hat

Login Incorrect

I have rebooted my box (Redhat Linux) and the system is back online now, but Iam unable to login via ssh for all the users including root, it says "Login Incorrect". I am pretty sure the username/password is correct.May be the password or the shadow file is corrupted ??? How do i login to the... (6 Replies)
Discussion started by: sydney2008
6 Replies

11. UNIX for Dummies Questions & Answers

get all user's login time

hi all, i need yor help!!!:D i am a newbie in programming i want to get user list and their login time... i have search and learn about pswd and utmp, but i only can get usr list without their login time... do you have an idea to solve my problem? thanx (5 Replies)
Discussion started by: alif
5 Replies

12. UNIX for Dummies Questions & Answers

Help Needed using utmp file!

Hi. I am working on a small assignment where i need to extract the login information of currently logged in users in a Linux client-server environment.I am able to extract only the userID,IP/HOST name,TTY,device name,GID,PID and login time using the structure 'utmp'.Also when i am saving the... (2 Replies)
Discussion started by: maverixxx
2 Replies

13. OS X (Apple)

Login/Logout script

Dear readers I use SnowLeopard 10.6.2 and need to do some special tasks at login and logout of an sepcific user. My problem is, how do I send a string "login" respectively "logout" from computer "A", where the login/logout script runs, to computer "B" where some other tasks need to be done. ... (3 Replies)
Discussion started by: tthaler
3 Replies

14. Emergency UNIX and Linux Support

LAST command with Year

Hi Guys, I'm trying to identify the last logins by all the users in the system in AIX. the last command gives me the output, but there is no year displayed for it . Since there is a duplication of months i mean Apr 2010 and Apr 2009 also its giving me inaccurate data.. Is there a way I can filter... (4 Replies)
Discussion started by: kkeng808
4 Replies

15. BSD

How to get the FreeBsd system information?

Hi, How to get the FreeBsd system hardware and software basic information using terminal command with guest login? Here below i have specified some of the information i need. Please have a look at this and guide me. OS Name: OS Version : OS Manufacturer: OS... (2 Replies)
Discussion started by: forumguest
2 Replies