[Samba] root prexec/postexec & login scripts

Mike Rambo mrambo at lsd.k12.mi.us
Mon Oct 28 14:45:02 GMT 2002

I have a perl script that I'd like to use to create windows 9x login
scripts at login time but I cannot get the process to work right. I have
RedHat 7.3 (actually the k12ltsp v2.1.0 which is a modified RH7.3) set
up as a domain controller which is working well. Manually created login
scripts run fine on the workstations at login. I'm using a netlogon
script I found at http://www.0x0a.com/netlogon.php that I've modified to
handle multiple groups based upon group membership in /etc/group as I
need. If I run the script from a command line supplying just a username
it works ok.

./netlogon.pl mrambo   #This results in a good script.

When I put in a root preexec like...

   comment = Network Logon Service
   path = /home/netlogon
   guest ok = yes
   read only = yes
   browseable = no
   printable = no
   write list = @adm
   share modes = no
   root prexec = /home/netlogon/netlogon.pl %U
   root postexec = rm -f /home/netlogon/%U.bat

it fails to run. My box was running samba 2.2.3a as distributed w/RH7.3.
When I inserting the root preexec statement in smb.conf the domain
logons would no longer function. I received a no domain controller error
message. I could still manually map drives after clicking ok at the
error message though. I could not see anything in the logs related to
preexec or domain logon problems at log level 2. I couldn't get log
level 3 to work for some reason on the RH supplied samba so I upgraded
to the 2.2.6 samba binaries on samba.org. I still get the same no domain
controller error on the workstation but now with the added 'feature'
that it also seems to hang an nmbd process on the server.

Help!!! I worked on this almost all day Saturday including searching the
samba archives on marc.theaimsgroup.com and I'm out of ideas.


Mike Rambo
mrambo at lsd.k12.mi.us

More information about the samba mailing list