All, I recently decided to add a preexec command in the smb.conf file to log the event when a user connects to a share. Most of the documentation that I have read for the 2.0.5a version of the s/w indicates that the attribute should be defined at the share level (that's good). However when I add the following entry into the config file [sharename] preexec = echo "%u connected to %S from %m" >> /tmp/samba.log nothing seems to happen. smbstatus and testparm don't report any problem with the setting , although I did notice that a preexec param exists in the [global] section too. Well , I made the change to the config and added the above mentioned entry to the [global] section. No luck. The permissions on the /tmp/samba.log file and OK since I can successfully execute the echo command from the server. Any clues. Setup Linux Server (RH6.2 on Intel) running Samba 2.0.5a WinMe clients connecting Thanks Nick Dewan
Here are a couple which work fine here. Yours looks similar. Maybe try something simpler like echo hi >> /tmp/junk What user does your smb.conf run under? Are the permissions on /tmp/samba.log 777 ? Joel [Z32] exec = echo %U has logged onto Z32 | mutt -s "Log report" jlh [junk] exec = a=`smbstatus | grep ftp`;[ -n "$a" ] && exit 0> All, > > I recently decided to add a preexec command in the smb.conf file to log the > event when a user connects to a share. Most of the documentation that I > have read for the 2.0.5a version of the s/w indicates that the attribute > should be defined at the share level (that's good). However when I add the > following entry into the config file > > [sharename] > preexec = echo "%u connected to %S from %m" >> /tmp/samba.log > > nothing seems to happen. > > smbstatus and testparm don't report any problem with the setting , although > I did notice that a preexec param exists in the [global] section too. Well > , I made the change to the config and added the above mentioned entry to the > [global] section. No luck. > > The permissions on the /tmp/samba.log file and OK since I can successfully > execute the echo command from the server. > > Any clues. > > Setup > Linux Server (RH6.2 on Intel) running Samba 2.0.5a > WinMe clients connecting > > Thanks > > > Nick Dewan > > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/samba