[Pkg-samba-maint] [samba] 02/04: handle AD samba daemon in samba init script
Ivo De Decker
ivo.dedecker at ugent.be
Thu Oct 10 19:41:29 UTC 2013
Hi Jelmer,
Thanks for reviewing the changes.
On Thu, Oct 10, 2013 at 09:29:37PM +0200, Jelmer Vernooij wrote:
> > start)
> > /etc/init.d/nmbd start
> > /etc/init.d/smbd start
> > + /etc/init.d/samba-ad-dc start
> This should be either/or.
>
> When running Samba in AD DC mode, the samba binary will fork smbd. In that
> case we shouldn't be starting smbd here.
>
> samba-ad-dc is also only necessary when Samba is running in domain mode.
The init script check which mode is being used, and only runs in the relevant
mode.
>From debian/samba.samba-ad-dc.init (the other have something similar):
case "$1" in
start)
SERVER_ROLE=`samba-tool testparm --parameter-name="server role" 2>/dev/null | tail -1`
if [ "$SERVER_ROLE" != "active directory domain controller" ]; then
exit 0
fi
So you either get something like (non ad mode):
[ ok ] Starting SMB/CIFS daemon: smbd.
[ ok ] Starting NetBIOS name server: nmbd.
Or (ad mode):
[ ok ] Starting Samba AD DC daemon: samba.
The stop script always stop all of them, because this is necessary when the
config is changed from one mode to the other.
In my test setup, I test the following for every commit:
- install samba 3.6 from unstable
- add user
- read homeshare (with smbtar)
- upgrade to samba 4.0 (my git build)
- read homeshare
- provision AD DC
- restart samba
- recreate user
- read homeshare
All of this seems to work.
Cheers,
Ivo
More information about the Pkg-samba-maint
mailing list