Summary: Verifying that a user changed their password within u_exp

From: John Galt (jgalt163_at_comcast.net)
Date: 09/07/04

  • Next message: Fred Leung: "chroot command"
    Date: Tue, 07 Sep 2004 09:31:24 -0400
    To: tru64-unix-managers@ornl.gov
    
    

    Hello Managers,

    Thanks to all who responded.

    As everyone pointed out, the prpasswd parameter "u_succhg" indicates the
    t_time since the user changed their password. However, I needed a way to
    make that human readable.

    Thanks to Rochelle Lauer who sent a C program that would convert those
    seconds to the actual date. I've included the programs at the end of this
    email.

    Also to Dan Price, who sent a simpler command that will convert the time to
    an actual date. That command is:

    # echo "ctime 1053073399" | kdbx -k vmunix | tail -1

    I will work on a script that will extract the u_succhg string from a user's
    edauth output and feed it to one of these commands.

    Thanks again.
    John

    Rochelle's Programs:
    --- convert_time_readable.c -------------
    #include <time.h>
    main(int argc, char *argv[])
    {
    time_t mktime(struct tm *usertime);
    char *ctime (const time_t *timer);
    struct tm *localtime(const time_t *timer);
    const time_t *out_time_ptr;
    struct tm *out_tm;
    time_t date_time_t;
    char *out_ascii ;
    date_time_t = 0;
    if (argc != 2)
    {
    printf ("Parameters missing\n");
    exit();
    }
    sscanf(argv[1],"%d",&date_time_t);
    out_time_ptr= &date_time_t;
    out_ascii = ctime(out_time_ptr);
    printf(" %s",out_ascii);
    out_tm = localtime(out_time_ptr);
    exit();
    }
    ---------------------------
    #include <time.h>
    /*
    convert_time.c
    rl jan 1998
    input: date as a time_t value (seconds since jan 1970)
    output month (0-11) day year (since 1900) hour minute
    see convert_time_readable for a ascii readable date format
    */
    main(int argc, char *argv[])
    {
    time_t mktime(struct tm *usertime);
    char *ctime (const time_t *timer);
    struct tm *localtime(const time_t *timer);
    const time_t *out_time_ptr;
    struct tm *out_tm;
    time_t date_time_t;
    char *out_ascii ;
    date_time_t = 0;
    if (argc != 2)
    {
    printf ("Parameters missing\n");
    exit();
    }
    sscanf(argv[1],"%d",&date_time_t);
    out_time_ptr= &date_time_t;
    out_ascii = ctime(out_time_ptr);
    /*
    printf(" %s",out_ascii);
    */
    out_tm = localtime(out_time_ptr);
    printf("%d %d %d %d
    %d",out_tm->tm_mon,out_tm->tm_mday,out_tm->tm_year,out_tm-
    >tm_hour,out_tm->tm_min);
    exit();}

    Original Post:
    >Hello Managers,
    >
    >We are running T64 v5.1a patch 2 with Enhanced Security enabled.
    >
    >The u_exp setting is set for 90 days and has always appeared to work properly.
    >
    >However, I've been asked to be able to "prove" that a user actually has
    >changed their password within the last 90 days.
    >
    >Is there a logging mechanism that can be enabled to log when a user last
    >changed their password? Is this something I can find with evm?
    >
    >How can I demonstrate that the user has changed their password in the
    >last 90 days?
    >
    >Thanks.
    >
    >John


  • Next message: Fred Leung: "chroot command"

    Relevant Pages

    • Re: referring to struct members by number.
      ... For certain operations I would like to have easy access to struct ... char member2; ... printf(" %s\r\n", mystruct.member1); ... I could avoid having to name each member? ...
      (comp.lang.c)
    • referring to struct members by number.
      ... For certain operations I would like to have easy access to struct ... char member2; ... printf(" %s\r\n", mystruct.member1); ... I could avoid having to name each member? ...
      (comp.lang.c)
    • referring to struct members by number.
      ... For certain operations I would like to have easy access to struct members. ... char member1; ... printf(" %s\r\n", mystruct.member1); ... Is there some way I could avoid having to name each member? ...
      (comp.lang.c)
    • referring to struct members by number.
      ... For certain operations I would like to have easy access to struct ... char member2; ... printf(" %s\r\n", mystruct.member1); ... I could avoid having to name each member? ...
      (comp.lang.c)
    • [PATCH]a tar filesystem for 2.6.10-rc1-mm3
      ... +static int tarfs_readdir(struct file * filp, ... struct tarent *dir_tarent, *ent; ... +static int tarfs_readlink(struct dentry *dentry, char *buffer, int buflen) ...
      (Linux-Kernel)