lastlog in /var/adm

Hi,

There is this file in /var/adm/lastlog. I would like to know how to
read it, any pointer is appreciated.

Thanks in advance.
0
Dolphin
6/3/2008 12:43:36 AM
comp.unix.solaris 25873 articles. 0 followers. Post Follow

2 Replies
4409 Views

Similar Articles

[PageSpeed] 40
On Jun 3, 10:43 am, Dolphin <yc282...@yahoo.com.sg> wrote:
> Hi,
>
> There is this file in /var/adm/lastlog. I would like to know how to
> read it, any pointer is appreciated.
>
> Thanks in advance.

I think your better off using the 'last' command as it displays data
in a more readable format. Examples include:

# man last
# last
# last shutdown
# last login
# last root
# last reboot
0
webigh86
6/3/2008 3:14:39 AM
In article <50b5bde7-73e2-4d39-9913-17bf90cf9769@w4g2000prd.googlegroups.com>,
	webigh86@gmail.com writes:
> On Jun 3, 10:43 am, Dolphin <yc282...@yahoo.com.sg> wrote:
>> Hi,
>>
>> There is this file in /var/adm/lastlog. I would like to know how to
>> read it, any pointer is appreciated.
>>
>> Thanks in advance.
> 
> I think your better off using the 'last' command as it displays data
> in a more readable format. Examples include:

last(1) doesn't display /var/adm/lastlog at all.
The only command which does is finger(1).
Other than that, it's used by login, sshd, pam modules, and the like.

The file is a (sparse) array of struct lastlog (/usr/include/lastlog.h)
indexed by uid. Hence it can appear very big if you have large uids, but
it should be a sparse file (unless copied by anything which doesn't
preserve sparse files).

-- 
Andrew Gabriel
[email address is not usable -- followup in the newsgroup]
0
andrew
6/3/2008 8:35:51 AM
Reply:
Similar Artilces:

merge with by VAR but
I need to merge two datasets together like below, I need to merge by id but I need every combination of var and var16 and var and var16 are not a common variable is this possible? If so I am not finding what I need with the by merge and in merge. Am I missing something in SAS? Can an SQL do what I need to do? data1 id var var2 1 a t 1 b c 2 a d 2 c m data2 id var16 var18 1 n q 1 o t 1 p w 2 f f results data3 id var var2 var16 var18 1 a t n q 1 a t o ...

Problem with thread function/global var
Hello, I'm a bit of a newbie to pthreads, and quite rusty with C... I am trying to get a very old C app (sga) to create a couple of worker threads while preforming calculations on an array. The application depends on a header file (sga.h) to define all global variables. This header file does not define function prototypes, instead each file that defines a function is individually compiled and linked afterwards. The global variables are set the way they should be everywhere, except in the thread function. For some reason my variables are undefined in the thread function. I would have...

Re: Reading a lists of vars into a macro var #3
Cristian, If Toby's or datanull's suggestions suffice, don't bother reading my suggestion. I usually rely on dictionary.columns for such tasks, although it may require that you do an initial run to identify which varnums you are interested in including. For example, try the following: proc sql noprint; select name into :varnames separated by ' ' from dictionary.columns where libname eq 'SASHELP' and memname eq 'CLASS' and varnum GE 2 and varnum LE 5 ; quit; %put &varnames.; HTH, Art ---------- On Wed, 9 A...

WTF!?
I am at my wits end; I can not see A SINGLE THING I'm doing wrong. I've read every fricking session related doc. I've searched every fricking group. NO ONE seems to have had the problem I'm having - and it doesn't make ANY sense. I'm running php 4.3.3 on a local server; and 4.3.10 on my isp's web server. I've tested this on both with the same results. all I fricking want to do is pass an array from 1 script to the next - sure sounds simple enough - right? here's my code: __________________________________________________________________________ TEST1.PHP:...

Re: Best way to merge multiple datasets with Unlike Var Names #3
On Wed, 30 Apr 2008 14:27:09 -0400, Lizette Koehler <starsoul@MINDSPRING.COM> wrote: >I have two sas datasets that contain the same information but in different variable names. I am having one of those moments where I cannot see how to do this. Any help is appreciated. > >Data DS1; > INPUT A $ B $ C $ ; > Cards ; > Small Tike Red > Med Bike Blue > Large Bike Red ;; > >Data DS2 ; > INPUT X $ Y $ Z $ ; > Cards ; > Small 10.99 1yr > Small 20.99 2yr > Large 50.00 1yr > ;; > >Data AllDS ; > Merge DS1 DS2 ; > (...

var.innerHTML where var is a variable!!
Is there any way to use a variable.innerHTML = ""; instead of text.innerHTML = "";? It doesn't seem to work for me. Thanks, Keiron "Keiron Waites" <webmaster@-NOSPAM-sharemonkey.com> writes: > Is there any way to use a variable.innerHTML = ""; instead of text.innerHTML > = "";? It doesn't seem to work for me. I am sorry, but I can't see what you are trying to do. The "innerHTML" property is a property of Document Object Model nodes, not of text strings. You can do document.getElementById("elemName...

SSHD lastlog problem
RH 9 I get the following error in SSH lastlog_get_entry: Error reading from /var/log/lastlog: No such file or directory yet, here it is: -rw-r--r-- 1 root root 152424 Dec 29 09:05 /var/log/lastlog any ideas anyone? catcher39@www.com (Your name) wrote in message news:<5329378.0312291023.1c4bca41@posting.google.com>... > RH 9 > > I get the following error in SSH > lastlog_get_entry: Error reading from /var/log/lastlog: No such file or directory > > yet, here it is: > -rw-r--r-- 1 root root 152424 Dec 29 09:05 /var/log/l...

Re: Does RETAIN statement require var-by-var listing? #2
The way you used it, yes. The -- lists look at the PDV (whatever is in the data step stream, give or take) and get the list. The problem is when the RETAIN is *before* the SET statement, the PDV is empty, so it doesn't have anything to list from. IE, you have PDV: empty RETAIN var var2 PDV: var var2 SET [contains: var var2 var1] PDV: var var2 var1 KEEP var--var1 PDV: var var2 var1; keep statement contains 'var var2 var1' by default run; etc. while you in your set have: PDV: empty RETAIN var--var1 PDV: empty, error; var--var1 refers to unknown variab...

Re: Proc Tabulate Var Font_size
I'm using: ods tagsets.excelxp options(sheet_inerval='none' sheet_name='2007'); to create multiple sheets in a workbook. I use the identical code in each proc tabulate, but for some reason my formatting isn't applied correctly (eg titles aren't centered in the 2nd sheet that were centered in the 1st sheet). Any thoughts on this? Thanks again. --------------------------------------- On Apr 22, 2:19 am, jas...@UCLA.EDU (J M) wrote: > How do I change the font_size of the variable names (not the actual > values of the variables) in the "var" row (ie i...

explicitly initialising member vars
A question on "correctness" of java code here.... I've been lead to believe that declaring class member variables without explicitly initialising them (even to null or 0) is a Bad Thing(tm), i.e. you should write: private int count = 0; and not just private int count; However, my understanding of the java spec is that it does specify that member variables that aren't explicitly initialised get initialised to 0 or null. So can anyone give me a good reason to always explicitly initialise member vars? thanks "Alex Hunsley" <alex.hunsley@blueyonder...

GConf In /var/log/messages
I was searching in /var/log/messages for clues to another problem. I found the answer to the problem I was searching for. Can anyone give me a clue as to why the following would be in there? I don't use Gnome as I don't like it. I use KDE on my Slackware 9.0. I do have the gnome library files as some of the things I use require those. I recently started testing Crossover Office could this be the reason for the following? I don't even know if I'm asking in the correct place. Aug 3 12:44:55 gungholady gconfd (kathy-11874): starting (version 2.2.0), pid 11874 use...

while read VAR VAL; do setenv $VAR $VAL; done
Hi, I use "source set_envs.csh" and ". set_envs.sh" to let the users set a longer list of environment variables at our site. Because I don't want to maintain the same list in 2 files, I'm trying to rewrite the set_envs.csh to make it just read the set_envs.sh and replace the "export VAR=VAL" lines by the "setenv VAR VAL". While the regex for that is easy: sed -ne 's/^export[ ]*\([^=][^=]*\)=\(.*\)/setenv \1 \2/p' set_envs.sh I wonder, how to do the rest? In a Bourne shell I would probably do something like this: sed -ne 's...

does "struct_name var = { 0 }; " fill var with 0?
I have seen this syntax and would like to know weither var_name is entirely filled with zeroes or only a first few bytes are zeroed (for example the first field of the structure). I have of course tried it with MSVC and it seemed to fill the entire structure, but is this the norm? Where can I find more informations? thanks in advance, Fred On Sun, 10 Aug 2003 10:47:02 +0200, "Fred" <dalox_nojunk@free.fr> wrote: >I have seen this syntax and would like to know weither var_name is entirely >filled with zeroes or only a first few bytes are zeroed (for example the >...

consistency of sorting a date or time var in num and char
Hi there, Obviously sorting a date var as numeric is different from a date9. formatted character, since '03JAN2009' is ordered after '03APR2009'. But '03JAN2009'DT should have the same order as '01032009'. For time var, a time5. formatted string will not have the same order as the underline numeric var, since time5. is not zero padded. I wonder what kind of formatted date, time or datetime var have the same order as the underline numeric var. Thanks Ya ...

Spreadsheet::WriteExcel new($var) not working
Hi I am trying to use the perl module Spreadsheet::WriteExcel to create a new XLS file and write into it, however in my case the name of the xls file has to be entered by the user and it can not be fixed. So to achieve this write something like this in my code where $XLSPath is entered by the user before this line. #46 my $xlsReport = Spreadsheet::WriteExcel->new($xlsFileName); However, I get the error --- Can't call method "add_worksheet" on an undefined value at line 96 in c:\report-xls.pl which is --- #95 # Create new Worksheet in the workbook #96 $worksheet = $xl...

proc freq
Hi all, I was wondering if there was an easy way to set up a proc freq (without using a macro) which crosses a varying number of variables. Here's the setup to show you what I mean... I have a dataset which will have a varying number of variables: techdx_1 techdx_2 techdx_3 . . . techdx_N The macro variable NUMDX will hold the number N I want to cross all the techdx variables in a single table in a proc freq. I tried proc freq data=mydata; tables techdx_1-techdx_&NUMDX; run; but this creates a table for each techdx variable. Remember I need to do this without writing a macro if...

Perl Solaris/Linux LASTLOG
i have to process a large amount of data and i cannot perform this on the invidual servers for either security sake or the way we have been setup. here is the script from the PERL COOKBOOK to show the closest approach #!/usr/bin/perl # laston - find out when given user last logged on use User::pwent; use IO::Seekable qw(SEEK_SET); open (LASTLOG, "/var/log/lastlog") or die "can't open /usr/adm/lastlog: $!"; $typedef = 'L A12 A16'; # linux fmt; sunos is "L A8 A16" $sizeof = length(pack($typedef, ())); for $user (@ARGV) { $U = ($user =~ /^...

Lastlog Empty?
Hi, Upon typing "last" this morning I was greeted with: wtmp begins Fri Jul 1 10:02:14 2005 .....rather than the list of logins I expected. Any idea what might have caused this? I've thoroughly checked the other logs (which are intact), and I can see no presence of an exploit. Regards, bub. In comp.os.linux.misc bub <ungabunga@milan.net>: > Hi, > Upon typing "last" this morning I was greeted with: > wtmp begins Fri Jul 1 10:02:14 2005 > ....rather than the list of logins I expected. Any idea what might have > caused this? I've thorou...

Invoking constructor : Foo(var) and Foo ins(var)
Hi, What is wrong with this code? ====== C++ code : File t.cpp : BEGIN ====== #include <iostream> using namespace std; struct Foo { Foo (int n) { cout << n << endl; } }; int main () { int i = 100; // Line#11 Foo (i); // Line#13 : Compilation error Foo f (i); // Compiled with no errors Foo (200); // Compiled with no errors Foo (int(300)); // Compiled with no errors return 0; } ====== C++ code : File t.cpp : END ======== ====== Compilation : BEGIN ====== $ g++ -v [--omitted--] gcc version 3.3.1 (cygming special) $ g++ t.cpp t.cpp: In functi...

passing env var with mpich1
I've an account on a Linux cluster that's running mpich1 (sic) and jobs have to be submitted via Sun Grid Engine (sge). My code makes heavy use of env vars but these are not being propagated from the submissiion ('qsub') script to the running executables. I've not had this problem with mpich2 (although not tried that with sge). Any clues anybody? thanks Michael michael.bane@manchester.ac.uk >> On 14 Jun 2006 06:16:45 -0700, >> "michael.bane@manchester.ac.uk" <michael.bane@manchester.ac.uk> said: > I've an account on a Linux cluster tha...

chkrootkit / lastlog
I just run chkrootkit 0.45 and got this bit: "Checking `z2'... user root deleted or never logged from lastlog!" And actually 'lastlog' says that root "Never logged in". Googling for info only yielded two results with no valuable data. This is the only alarm showed by chkrootkit. All the rest seems normal, and I haven't noticed any weird stuff lately either. OTOH, 'last' and 'who' show perfectly the last times I've used a root terminal. Could this be a false alarm, or should I worry? > And actually 'lastlog' s...

lastlog dead
I removed erroneously my /var/log/lastlog file some time ago, then realizing my mistake I created it again, empty (I guess some logging daemons do not work without an existing log file). Yet, many weeks passed and my lastlog file remains sad & empty. Any idea? I checked, but didnt understand which program writes on it (not syslogd, I checked). Ah, yes: RedHat7.3, kernel 2.4.18 Thanks! Alessandro Magni "Alythh" <alythh@netscape.net> wrote in message news:6a25ba72.0401130053.398194ba@posting.google.com > I removed erroneously my /var/log/lastlog file some time ago, t...

Re: First.var and last.var issue in by statement
Nuno , They are identical since the forst example just evaluates to a boolean of 1 or 0 for true or false. If it is the first or last value in a by group they will have a value of 1 and if not a value of 0 respectively. While the second example makes an explicite comaprison. An easy way to really see what is happening is to do something like: Data table1; set table; By var1; Put _all_ ; Run ; look at the log and find the first.var1 and last.var1 values. Toby Dunn When everything is coming at you all at once, your in the wrong lane. A truly happy person is someone who can smile and e...

changing a var by reference of a list
Hi, I am trying to simplify my code, and want to automate the assigning of variables I get back from a set. I was thinking of putting the variables I want changed in a list: L = [self._varA, self._varB ] self._varA is a variable I want to change when I pass L to a function. I know doing this; L[0] = 12 Will replace the entry self._varA with 12, but is there a way to indirectly change the value of self._varA, through the list, something like a by-reference in C++ or a pointer-pointer? With regards, - Jorgen Jorgen Bodde wrote: > Hi, > > I am trying to simplify my code, and want...

creating vars on the fly
Hi everyone, I have a project that I'm working in which the user is allowed to create and add columns to certain tables in mysql. After they add them, I need to be able to display them in a form so I can use them. Now, that part isn't a problem, but what I'm having a problem w/ is that when I submit them through the form, how can I process all the fields dynamically. The user could add 20 fields so how in my code could I handle that. If anyone could help me out I would appreciate it or if you need more info or I'm not making sense let me know. LAMP environment, PHP 4.2.3...