Hi, i just want to know if it's possible (i guess it is) to see in a log file the logging (date and hour) of a user. I looked in /var/log/smbd.log, nmbd.log, machine.log but there is no record when the user pat (for example) loged in the network. Does someone knows ? Thanks.
Hi, you can use the utmp logging feature. Place the following options in the global group of smb.conf: utmp = Yes utmp directory = /var/log/samba/utmp wtmp directory = /var/log/samba/wtmp then mkdir -p /var/log/samba/utmp mkdir -p /var/log/samba/wtmp touch /var/log/samba/utmp/utmpx touch /var/log/samba/wtmp/wtmpx This should do the trick. The command last -f /var/log/samba/wtmp/wtmpx shows you the infos. br, Sebastian -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 190 bytes Desc: not available Url : http://lists.samba.org/archive/samba/attachments/20060103/7a807c3d/attachment.bin
Am Dienstag, 3. Januar 2006 15:43 schrieb Sebastian Held:> see attached patch for the last-command.yeah, it stripped my patch... inline version: --- last.orig 2004-07-30 14:16:26.000000000 +0200 +++ last.c 2006-01-03 15:35:26.000000000 +0100 @@ -451,13 +451,13 @@ #endif if (!altlist) { snprintf(final, sizeof(final), - "%-8.8s %-12.12s %-16.16s " + "%-8s %-12.12s %-16.16s " "%-16.16s %-7.7s %-12.12s\n", p->ut_name, utline, domain, logintime, logouttime, length); } else { snprintf(final, sizeof(final), - "%-8.8s %-12.12s %-16.16s %-7.7s %-12.12s %s\n", + "%-8s %-12.12s %-16.16s %-7.7s %-12.12s %s\n", p->ut_name, utline, logintime, logouttime, length, domain); } br, Sebastian -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 190 bytes Desc: not available Url : http://lists.samba.org/archive/samba/attachments/20060103/89acd03a/attachment.bin