SUMMARY [2]: edauth and coded dates

From: Skeate, Scott B <scott.b.skeate_at_lmco.com>
Date: Thu, 05 Aug 1999 17:37:15 -0400

Late entry... I haven't had a chance to look at these yet... but as Larry
says, there is apparently demand for this type of thing.

> ----------
> From: Larry Griffith
> Sent: Thursday, August 05, 1999 5:26 PM
> To: Skeate, Scott B
> Subject: Re: edauth and coded dates
>
> <<num_time.c>> <<display_time.c>>
> > I've searched the archives for this and can't find the answer.
> >
> > If I run edauth -g <username>, I get a list of several things.
> > I believe u_succchg#xxxxxxxxx: is the date of the last successful
> password
> > change.
> >
> > I believe this number is probably some time interval from some time/date
> > combination.
> >
> > Does anyone know the what this number means?
> > Does anyone have a script or other tool to easily convert it?
>
> It's the number of seconds since midnight January 1, 1970 (the
> "base time" for UNIX). Here are two C programs that convert the
> numeric time to an ordinary description and vice versa. I've sent
> these out to a number of list subscribers; there apparently is quite a
> demand for this. display_time.c is the one you requested; num_time.c is
> the opposite conversion.
>
> Larry
>
>
> ----------
> From: Skeate, Scott B
> Sent: Thursday, August 05, 1999 5:28 PM
> To: 'tru64-unix-managers_at_ornl.gov'
> Subject: SUMMARY: edauth and coded dates
>
> Special thanks to: Pavel Krizka, Jim Fitzmaurice, and Gordon Lawson.
>
> The number is a time from the UNIX Epoch of 00:00:00 1/1/1970 (Which, by
> the way, will die for 32 bit time keepers after 22:14:07 1/18/2038)
>
> Gordon provided the script and info below which does just what I need to
> convert that time.
>
> /* Filename: /home/gordonl/toys/figure_time.c */
>
> /* This program attempts to figure the time, given an argument in */
>
> /* seconds since 1970. */
>
>
>
> # include <time.h>
>
> # include <stdio.h>
>
> # include <stdlib.h>
>
>
>
> int main(int argc, char *argv[])
>
> {
>
> int x;
>
> char *y;
>
> time_t *timer;
>
>
>
> if(argc < 2){
>
> printf("Usage: %s number Where number is seconds past 1970\n",
> argv[0]);
>
> printf("Remember that this is time based on GMT, i.e. -6 hours here
> (Houston)\n");
>
> exit(0);
>
> }
>
> /*
> printf("%s %s\n", argv[0], argv[1]);
> */
>
> x = atoi(argv[1]);
> timer = &x;
> y = ctime(timer);
> /* Same as y = asctime(localtime(timer)); */
>
> printf("%s\n", y);
>
> return(0);
> } /* main() */
>
> This works, but I know it's not pretty... What do ya want for free?!? ;)
> Compile with: cc figure_time.c -o figure_time
> To use: figure_time number_to_convert
> (You might want to change the usage message to your area...)
> If you can't get it to work, let me know... I'm assuming you know at least
> some programming, text editing, etc that a sys-admin knows.
>
>
>
>
>
> Original Question Below:
> > ----------
> > From: Skeate, Scott B
> > Sent: Thursday, August 05, 1999 3:37 PM
> > To: 'tru64-unix-managers_at_ornl.gov'
> > Subject: edauth and coded dates
> >
> > I've searched the archives for this and can't find the answer.
> >
> > If I run edauth -g <username>, I get a list of several things.
> > I believe u_succchg#xxxxxxxxx: is the date of the last successful
> password
> > change.
> >
> > I believe this number is probably some time interval from some time/date
> > combination.
> >
> > Does anyone know the what this number means?
> > Does anyone have a script or other tool to easily convert it?
> >
> > Thanks for your help.
> > Scott Skeate
> > scott.b.skeate_at_lmco.com
> >
>
>
>
>

Received on Thu Aug 05 1999 - 21:41:16 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:39 NZDT