[Samba] Premature logoff from [netlogon]

Scott Werschke scott at werschkes.com
Sat Sep 6 07:27:05 GMT 2003


I am currently using Samba as a PDC, and my logon scripts are generated by a bash shell script run with the root preexec parameter in the [netlogon] share.  In this script (and in the postexec script) I use the sessreg command (part of the XFree86-4.2.1 package).  This command allows me to see who is currently logged into the domain with the "who" command.  

Works great except that users seem to be logging off the [netlogon] share just a few minutes after they logon and well before they logoff the domain.   Thus I only see them with "who" for a few minutes instead of the entire time they are logged on to the domain as I intended.

Relevant excerpt from my smb.conf -

[netlogon]
  path = /home/_shares/netlogon
  browseable = no
  read only = yes
  root preexec = /home/_shares/execscripts/netlogon.sh %U %g %H %M %a %I %m %T
  root postexec = /home/_shares/execscripts/netlogoff.sh %U %g %H %M %a %I %m %T

Relevant excerpt from my netlogon.sh script -

/usr/X11R6/bin/sessreg -a -l $7:smb -h $7:$6:$2 $1 2>&1 > /dev/null

Relevant excerpt from my netlogoff.sh script -

/usr/X11R6/bin/sessreg -d -l $7:smb -h $7:$6:$2 $1 2>&1 > /dev/null

Any ideas or helpful suggestions?



More information about the samba mailing list