/var/adm/sulog does not showing year

Hi,

I would like to know is there any way to capture the year in /var/adm/sulog file in solaris 10?

Please suggest

I'm afraid, the format is hardcoded in the su program:

/*
 * write entry into SULOG or onto CONSOLE - if write fails, return
 */
(void) fprintf(logf, "SU %.2d/%.2d %.2d:%.2d %c %s %s-%s\n",
    tmp->tm_mon + 1, tmp->tm_mday, tmp->tm_hour, tmp->tm_min,
    how ? '+' : '-', ttyn + sizeof ("/dev/") - 1, username, towho);

(taken from the illumos source code of the su program).

---------- Post updated at 13:41 ---------- Previous update was at 13:38 ----------

You could rotate the sulog file yearly and put the year into the filename of the rotated log.

Many Many Thanks Hergp for prompt response.