#!/bin/bash #(c) DatuX 2008 #we need to add an pre execute line, this was not in the original configurationfile if [ ! `grep -F '-e logon script = %U' /home/system/samba/smb.conf` ]; then sed 's/.*logon.bat/\troot preexec = \"\/usr\/sbin\/netlogon_script_creator %U\"\n\tlogon script = %U/' -i /home/system/samba/smb.conf || exit 1 fi svcreset /service/smbd || exit 1 exit 0