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/smbd/server.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3/smbd/server.c') diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 6abf8ccaeb..d53b19a57f 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -1227,6 +1227,13 @@ extern void build_options(bool screen); exit(1); } + if (lp_server_role() == ROLE_ACTIVE_DIRECTORY_DC + && !lp_parm_bool(-1, "server role check", "inhibit", false)) { + DEBUG(0, ("server role = 'active directory domain controller' not compatible with running smbd standalone. \n")); + DEBUGADD(0, ("You should start 'samba' instead, and it will control starting smbd if required\n")); + exit(1); + } + /* ...NOTE... Log files are working from this point! */ DEBUG(3,("loaded services\n")); -- cgit