Sketch
2015-Oct-05 18:31 UTC
[Samba] Question Wiki Setup a Samba Active Directory Domain Controller
On Mon, 5 Oct 2015, Rowland Penny wrote:> On 05/10/15 18:56, Birgit Berger (UV Wien) wrote: >> How do I stop scripts samba, smbd and nmbd being run at startup? > > I do not know because you are using Debian Jessie, this uses systemd which I > absolutely refuse to use! > > Perhaps somebody else can tell you how to do this and explain just how they > are all got started, because if you don't know how to stop them, I presume > you don't know how they got started in the first place.To disable systemd services: systemctl disable samba systemctl disable smbd etc However, it does not normally handle traditional init files, which his services appear to be. At least in the redhat world, it redirects enable/disable calls for non-systemd services to chkconfig. I don't know if it does the same on debian (does it have chkconfig?), uses another tool, or does nothing. You may have to do things the (old) debian way, which involves removing symlinks from /etc/rc<runlevel>.d/ (or creating them to start a service in taht runlevel).
Rowland Penny
2015-Oct-05 18:40 UTC
[Samba] Question Wiki Setup a Samba Active Directory Domain Controller
On 05/10/15 19:31, Sketch wrote:> On Mon, 5 Oct 2015, Rowland Penny wrote: > >> On 05/10/15 18:56, Birgit Berger (UV Wien) wrote: >>> How do I stop scripts samba, smbd and nmbd being run at startup? >> >> I do not know because you are using Debian Jessie, this uses systemd >> which I absolutely refuse to use! >> >> Perhaps somebody else can tell you how to do this and explain just >> how they are all got started, because if you don't know how to stop >> them, I presume you don't know how they got started in the first place. > > To disable systemd services: > > systemctl disable samba > systemctl disable smbd > etc > > However, it does not normally handle traditional init files, which his > services appear to be. At least in the redhat world, it redirects > enable/disable calls for non-systemd services to chkconfig. I don't > know if it does the same on debian (does it have chkconfig?), uses > another tool, or does nothing. You may have to do things the (old) > debian way, which involves removing symlinks from /etc/rc<runlevel>.d/ > (or creating them to start a service in taht runlevel). >If the OP is using the older style init.d scripts, then the commands would be: service nmbd stop update-rc.d -f nmbd remove replace 'nmbd' with 'smbd' & 'winbind' for the other two Rowland
oeh univie edv lists
2015-Oct-05 19:45 UTC
[Samba] Question Wiki Setup a Samba Active Directory Domain Controller
chkconfig is not installed, but systemctl seems to work together with update-rc.d. 21:02:19 # systemctl disable samba Synchronizing state for samba.service with sysvinit using update-rc.d... Executing /usr/sbin/update-rc.d samba defaults Executing /usr/sbin/update-rc.d samba disable update-rc.d: error: samba Default-Start contains no runlevels, aborting. 21:02:58 # systemctl disable nmbd Synchronizing state for nmbd.service with sysvinit using update-rc.d... Executing /usr/sbin/update-rc.d nmbd defaults Executing /usr/sbin/update-rc.d nmbd disable insserv: warning: current start runlevel(s) (empty) of script `nmbd' overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `nmbd' overrides LSB defaults (0 1 6). 21:03:59 # systemctl disable smbd Synchronizing state for smbd.service with sysvinit using update-rc.d... Executing /usr/sbin/update-rc.d smbd defaults Executing /usr/sbin/update-rc.d smbd disable insserv: warning: current start runlevel(s) (empty) of script `smbd' overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `smbd' overrides LSB defaults (0 1 6). After restart no more nmbd and smbd: 21:12:57 # systemctl | grep nmbd 21:13:06 # systemctl | grep smbd 21:13:11 # systemctl | grep samba samba-ad-dc.service loaded active running LSB: start Samba daemons for the AD DC 21:13:13 # systemctl | grep samba-ad-dc samba-ad-dc.service loaded active running LSB: start Samba daemons for the AD Or you could see it here as well: 21:09:18 # /etc/init.d/smbd status ● smbd.service - LSB: start Samba SMB/CIFS daemon (smbd) Loaded: loaded (/etc/init.d/smbd) Active: inactive (dead) 21:09:32 # /etc/init.d/nmbd status ● nmbd.service - LSB: start Samba NetBIOS nameserver (nmbd) Loaded: loaded (/etc/init.d/nmbd) Active: inactive (dead) 21:09:38 # /etc/init.d/samba status ● samba-ad-dc.service - LSB: start Samba daemons for the AD DC Loaded: loaded (/etc/init.d/samba-ad-dc) Active: active (running) since Mon 2015-10-05 21:08:51 CEST; 51s ago Funny thing is Master STILL IS SHOWING. nscd (name service caching damon is not installed.) Any clues why this still shows?>>smbclient -L localhost -U%Domain=[BLA] OS=[Unix] Server=[Samba 4.1.17-Debian] Sharename Type Comment --------- ---- ------- netlogon Disk sysvol Disk IPC$ IPC IPC Service (Samba 4.1.17-Debian) Domain=[BLA] OS=[Unix] Server=[Samba 4.1.17-Debian] Server Comment --------- ------- Workgroup Master --------- ------- WORKGROUP MYHOSTNAME kind regards, birgit