It is currently Mon, 28 Jul 2014 19:34:41 GMT



 
Author Message
 /var/adm/lastlog

I'm looking for the structure of /var/adm/lastlog in Solaris 2.4 for
Sparc. It is not a pure ascii file and I can find no mention of its
format or any routines to access it.

much appreciated.
Michael

                 Bitstream Underground, Inc.
        Internet, World Wide Web, and Online Services
      212 3rd Ave N, Suite 490    Minneapolis, MN 55401
voice.612.321.9290     fax.612.321.9100      bbs.612.321.0212
        http://www.**-**.com/   g...@bitstream.net



 Wed, 07 Jul 1999 03:00:00 GMT   
 /var/adm/lastlog

The file /var/adm/lastlog contains an array of "struct lastlog"
as defined in <lastlog.h>.

The file is indexed by user id, to get the entry for a particular user
you would do:

        p = getpwnam(user);

        fd = open("/var/adm/lastlog", O_RDONLY);

        lseek(fd, p->pw_uid * sizeof struct lastlog, SEEK_SET);

        read(fd, &lastlog, sizeof struct lastlog);

Casper

--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.



 Thu, 08 Jul 1999 03:00:00 GMT   
 /var/adm/lastlog

/var/adm/lastlog is a binary database containing the date and time of the
last login for each user. It's used by sar.

tomp

In article <Pine.SOL.3.95.970118210207.17657A-100000@marley>,{*filter*}fe



 Fri, 09 Jul 1999 03:00:00 GMT   
 /var/adm/lastlog

See /usr/include/lastlog.h for the format of an individual entry.
I think the file is just an array of those, indexed by uid.  That
means the file is probably sparse, i.e. has unallocated "holes" that
would be filled in by most file utilities like mv, cp, etc. making
it much bigger.  Ufsdump/ufsrestore can handle sparse files without
filling them in, very little else can.

In 2.5.1, the maximum uid and gid size goes 'way up, to the max
value of a signed 32 bit integer.  Higher values can break things.
For example, values > 76695844 would cause lastlog to go over
the 2Gb max file size, causing last login info for those uids
not to be retained, and according to the 2.5.1 release notes, also
breaking password aging for them.

--
ftp> get |fortune
377 I/O error: smart remark generator failed

mailto:rlha...@mindwarp.smart.net  http://www.smart.net/~rlhamil



 Mon, 12 Jul 1999 03:00:00 GMT   
 /var/adm/lastlog

In comp.unix.solaris{*filter*}fe <lol...@bitstream.net> wrote:
-> I'm looking for the structure of /var/adm/lastlog in Solaris 2.4 for
-> Sparc. It is not a pure ascii file and I can find no mention of its
-> format or any routines to access it.

login(1) and finger(1) use it... try to find how :)
--
 E-mail: Matus.Uh...@tuke.sk WWW: http://www.**-**.com/
 IRC: fantomas, TALK: uh...@ccnews.ke.sanet.sk
 ...and if you think I'm talking for my employer, you're wrong...



 Mon, 12 Jul 1999 03:00:00 GMT   
 /var/adm/lastlog

Hi,

Lastlog is a sequence of entries.  Each one is in the form of
a structure which is defined by /usr/include/lastlog.h.  

The whole thing is a legacy from Solaris 1.  If you have a
Solaris 1 system handy, try 'man 5 utmp' and 'man 5 lastlog'
to get a little more info.

HTH,
Chris Raymond

On 23 Jan 1997, Matus Uhlar wrote:



 Tue, 13 Jul 1999 03:00:00 GMT   
 /var/adm/lastlog

Chris Raymond  <raym...@spof01.gsfc.nasa.gov> wrote:

...and the Solaris 1 version is a legacy from BSD. :-)

(I think "/var/adm/lastlog" may be part of SVR4; I forget whether that
was one of the BSDisms SVR4 picked up or not.)



 Tue, 13 Jul 1999 03:00:00 GMT   
 
   [ 7 post ] 

Similar Threads

1. how can I read /var/adm/lastlog?

2. how do you view /var/adm/lastlog?

3. how do you view /var/adm/lastlog?

4. /var/adm/lastlog wierdness

5. monitoring /var/adm/lastlog

6. /var/adm/lastlog

7. /var/adm/lastlog format

8. /var/adm/lastlog and X-sessions

9. /var/adm/lastlog grows enormously big


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software