From 8c71dc3505ab83ce95ab40a56f77313c4448be16 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 22 Aug 2012 21:01:16 +1000 Subject: param: Add startup checks for valid server role/binary combinations This should eliminate confusion from our users about what they can expect to successfully run. Andrew Bartlett --- source3/nmbd/nmbd.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source3/nmbd') diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c index 1728bb9c5a..d4df2020d5 100644 --- a/source3/nmbd/nmbd.c +++ b/source3/nmbd/nmbd.c @@ -888,6 +888,16 @@ static bool open_sockets(bool isdaemon, int port) exit(1); } + if (lp_server_role() == ROLE_ACTIVE_DIRECTORY_DC + && !lp_parm_bool(-1, "server role check", "inhibit", false)) { + /* TODO: when we have a merged set of defaults for + * loadparm, we could possibly check if the internal + * nbt server is in the list, and allow a startup if disabled */ + DEBUG(0, ("server role = 'active directory domain controller' not compatible with running nmbd standalone. \n")); + DEBUGADD(0, ("You should start 'samba' instead, and it will control starting the internal nbt server\n")); + exit(1); + } + msg = messaging_init(NULL, server_event_context()); if (msg == NULL) { return 1; -- cgit