Posts Tagged ‘samba’

Debian Etch + Samba + Windows 2008 Active Directory Server + DekiWiki

Friday, February 13th, 2009

So I needed to install DekiWiki. I decided to just use the VMWare Image they supply. It uses Debian Etch as its OS. As with all of our other Linux server, I decided this one needed to join our Active Directory Domain. I went to google and did a search for how to connect Debian to AD. Well plenty of guides poped up so I followed them like I did for Ubuntu and for our CentOS machines. I got to the step of actually joining the domain and I got this crappy error:

ads_connect: Server not found in Kerberos database

Well after a trip to the Samba IRC support room I found out I needed a newer version of Samba and WinBind. A simple fix on Debian. By default the Backports repository is already in the sources list on this VMWare image that dekiwiki came on. So all I had to do was:

apt-get -t etch-backports install samba

Then a simple:

net ads join -U administrator -S -W MHIPRIV.COM

That rewarded me with:

Enter administrator’s password:
Using short domain name — MHI
Joined ‘WIKI2’ to realm ‘’

With a few more changes to a few other config files and I am now able to ssh to that box as any AD user.

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
net time \\ /set /y
net use h: /delete
net use h: “\\\homes”
net use g: /delete
net use g: “\\\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

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
net time \\ /set /y
net use g: /delete
net use g: “\\\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.