Archive for the ‘openldap’ Category

The best course is to answer No and try again later.

Thursday, July 10th, 2008

I have been working on a Domain Controller at work using Samba 3.0.28 and openLDAP. I was trying to setup my windows client computers to login then map some drives from various other samba servers we have. My logon.bat file looked like this:

@echo off
REM # SYNC THE TIME WITH THE SERVER
net time \\pdc01.mhipriv.com /set /y
REM # DELETE ALL MAPPED DRIVES
net use h: /delete
net use h: “\\pdc01.mhipriv.com\homes”
net use g: /delete
net use g: “\\server.mhipriv.com\apps”

This was working but causing some weird issues when you would log in from a windows client. I would get this error on windows that said:

There are open files and/or incomplete directory searches pending on the connection to pdc01.mhipriv.com

So I went over to microsoft google and did a search for the error. #1 google result led me here So I am reading and sure enough this is my problem. So then on to the answer.. WTF!!! You mean seriously you want me to wait and try it again.. Im thinking to my self “You have to be fu**ing kidding me” So I wait, and wait, and wait, and then went home for the day and then today I try again and still the same shit. So I decided to find the real solution. What happened is that in my smb.conf I set the logon drive = H: so samba was already mapping it for me and then I was trying to /delete it and then remap it, and somewhere in that process was the problem. All you really need to do is either set

logon drive =

Because the default drive is Z:\ if its not set, or

logon script = logon.bat
logon path = \\%L\PROFILES\%U
logon drive = H:
logon home = \\%L\%U

And make sure your logon.bat looks like this

@echo off
REM # SYNC THE TIME WITH THE SERVER
net time \\pdc01.mhipriv.com /set /y
net use g: /delete
net use g: “\\server.mhipriv.com\apps”

I hope someone out there finds this more useful than the “The best course is to answer No and try again later.” crap answer I found on the M$ site.