Matthew's picture

Hi, completely new to linux, only achieved anything by following tutorials so please be gentle.

I have installed Ubuntu 12.04LTS and Samba4 v4.2 with great success, I now have a working AD domain controller. However I just need to understand the reasoning and possible implications of why the installation directory seems to have moved from previous versions.

From virtually every tutorial relatingto samba4 the smb.conf file resides at /etc/samba/. However on my installation it resides at /usr/local/samba/etc/

Now this hasn't been an issue until I tried to install openchange (big mistake as it completely breaks samba or at least my version) Luckily having achieved a working AD I cloned my disk as I suspected nothing could be as easy as following a tutorial.

So if anybody knows, why did they move things, is there anyway to alter this (possibly if anyone knows what version I can install that will be compatible with openchange (version 4.0 ish seems to be what most of the tutorials seem to want) and if I install an older version how do I stop it updating to newer versions with apt-get update/upgrade.

Being honest the tutorial I followed to get Samba working is about the only 1 that did get it working, so I'm a little wary of starting from scratch again.

Forum: 
Jeremy Davis's picture

Hi Matthew :)

TurnKey Linux is based on Debian so it's close, but not quite the same... And I have had nothing but a very minimal play with Samba4 so couldn't really give too much guidance anyway... Besides, it would be hard to even begin to help you without more info. I don't mean to be harsh or rude, just stating it how I see it...

My suggestion would be to:

A) Try contacting the author of the tutorial (comments section?) you followed, or post in a more relevant place (e.g. the Ubuntu forums or the Ask Ubuntu Q&A site).

Or

B) start with a clean install (I would suggest a virtual machine) and follow a complete tutorial that covers everything you want to install (I googled and found a few that covered installing Samba4 and Openchange).

Liban Hannan's picture

Hi Matthew,

2 months too late -

I'm assuming that what you have done is built Samba from git. This defaults to putting samba in /usr/local/samba/. I would suggest you spin up another VM and use the sernet packages. That'll get you a debian repository with samba 4.1.x packages (the current stable branch).

 

However if you prefer to keep building from source, you can set the placement of various files at the ./configure step with the following switches (these are just the ones I thought would be important, there are more but they're mostly for documentation):


    --bindir=BINDIR
            user executables [Default: ${EXEC_PREFIX}/bin]
    --sbindir=SBINDIR
            system admin executables [Default: ${EXEC_PREFIX}/sbin]
    --libexecdir=LIBEXECDIR
            program executables [Default: ${EXEC_PREFIX}/libexec]
    --sysconfdir=SYSCONFDIR
            read-only single-machine data [Default: ${PREFIX}/etc]

    --sharedstatedir=SHAREDSTATEDIR
            modifiable architecture-independent data [Default: ${PREFIX}/com]
    --localstatedir=LOCALSTATEDIR
            modifiable single-machine data [Default: ${PREFIX}/var]
    --libdir=LIBDIR
            object code libraries [Default: ${EXEC_PREFIX}/lib]
    --includedir=INCLUDEDIR
            C header files [Default: ${PREFIX}/include]
    --oldincludedir=OLDINCLUDEDIR
            C header files for non-gcc [Default: /usr/include]
    --datarootdir=DATAROOTDIR
            read-only arch.-independent data root [Default: ${PREFIX}/share]
    --datadir=DATADIR
            read-only architecture-independent data [Default: ${DATAROOTDIR}]

 

I suspect you will have set the location of pretty much all of those the way openchange wants them.

Though if its just /etc/samba thats messing things up, you could just symlink /usr/local/samba/etc to /etc/samba.

Unfortunately I haven't ever really dealt with open change.

Asad's picture

how to connect Samba AD DC with external Ldap and External kerberos Heimdal

Jeremy Davis's picture

If you are using TurnKey, please start your own thread.

If you aren't using TurnKey, then please post somewhere else more appropriate, like the support forums of your distro, etc.

Add new comment