Anderson Hoffmann do Carmo
2018-Oct-18 13:19 UTC
[Samba] /etc/init.d/samba in Ubuntu_18.04
Hello I use a script for backup Samba/AD and before running the backup I use the command '/etc/init.d/samba stop' After I migrated ubuntu from version 16 to version 18, this command was invalid root at gserv2:~# root at gserv2:~# */etc/init.d/samba stop* -bash: /etc/init.d/samba: No such file or directory root at gserv2:~# Please, which command should I use to stop and start the Samba/AD service correctly? Thanks, Anderson Hoffmann
Am 18.10.18 um 15:19 schrieb Anderson Hoffmann do Carmo via samba:> I use a script for backup Samba/AD and before running the backup I use the > command '/etc/init.d/samba stop' > After I migrated ubuntu from version 16 to version 18, this command was > invalid > > root at gserv2:~# > root at gserv2:~# */etc/init.d/samba stop* > -bash: /etc/init.d/samba: No such file or directory > root at gserv2:~# > > Please, which command should I use to stop and start the Samba/AD service > correctly?man systemctl /etc/init.d is gone msart distribution like Redhat based have placed a wrapper for their service command which redirect automatically, never called anything in /etc/init.d directly
On Thu, 18 Oct 2018 10:19:22 -0300 Anderson Hoffmann do Carmo via samba <samba at lists.samba.org> wrote:> Hello > > I use a script for backup Samba/AD and before running the backup I > use the command '/etc/init.d/samba stop' > After I migrated ubuntu from version 16 to version 18, this command > was invalid > > root at gserv2:~# > root at gserv2:~# */etc/init.d/samba stop* > -bash: /etc/init.d/samba: No such file or directory > root at gserv2:~# > > Please, which command should I use to stop and start the Samba/AD > service correctly? > > Thanks, > Anderson HoffmannThis is really a question for your OS, but I think you need: sudo systemctl stop samba Rowland
Hai, Can you post your smb.conf before we proceed? There where a lot of changes between 4.3 and 4.7. All changes must be done and match the samba you running now. For example, the old ubuntu config did have idmap config = This is now for example. idmap config * : backend = tdb idmap config * : range = 3000-7999 And /etc/init.d/samba Is replace in ubuntu first by : service Now on 18.04 its systemd : systemctl status samba Samba is gone, this is now smbd nmbd winbind samba-ad-dc Greetz, Louis> -----Oorspronkelijk bericht----- > Van: samba [mailto:samba-bounces at lists.samba.org] Namens > Anderson Hoffmann do Carmo via samba > Verzonden: donderdag 18 oktober 2018 15:19 > Aan: samba at lists.samba.org > Onderwerp: [Samba] /etc/init.d/samba in Ubuntu_18.04 > > Hello > > I use a script for backup Samba/AD and before running the > backup I use the > command '/etc/init.d/samba stop' > After I migrated ubuntu from version 16 to version 18, this > command was > invalid > > root at gserv2:~# > root at gserv2:~# */etc/init.d/samba stop* > -bash: /etc/init.d/samba: No such file or directory > root at gserv2:~# > > Please, which command should I use to stop and start the > Samba/AD service > correctly? > > Thanks, > Anderson Hoffmann > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba > >
Hello,> Please, which command should I use to stop and start the Samba/AD service > correctly?personally I use for active directory: samba For standalone file server: smbd And I use kill to stop them. I use the pid in the pid file to do so. Works fine for me. But it is probably better to use the infrastructure of the operating system. But since I have multiple samba systems running on a single node I go currently with the above but also specify the config file. Cheers, Thomas
On Thu, 18 Oct 2018 15:24:40 +0200 Reindl Harald via samba <samba at lists.samba.org> wrote:> > > Am 18.10.18 um 15:19 schrieb Anderson Hoffmann do Carmo via samba: > > I use a script for backup Samba/AD and before running the backup I > > use the command '/etc/init.d/samba stop' > > After I migrated ubuntu from version 16 to version 18, this command > > was invalid > > > > root at gserv2:~# > > root at gserv2:~# */etc/init.d/samba stop* > > -bash: /etc/init.d/samba: No such file or directory > > root at gserv2:~# > > > > Please, which command should I use to stop and start the Samba/AD > > service correctly? > > man systemctl > /etc/init.d is goneNo it hasn't, it is still there> > msart distribution like Redhat based have placed a wrapper for their > service command which redirect automatically, never called anything in > /etc/init.d directly >Yes, I suppose he could use 'service samba stop', except that probably wouldn't work either, 'samba' as a service was removed. 'service samba-ad-dc stop' might. Rowland
Anderson Hoffmann do Carmo
2018-Oct-18 14:18 UTC
[Samba] /etc/init.d/samba in Ubuntu_18.04
Thanks for anwsers! Works for me: I just changed '/etc/init.d/samba stop' to 'systemctl stop samba-ad-dc.service' Em qui, 18 de out de 2018 às 10:31, Thomas Glanzmann <thomas at glanzmann.de> escreveu:> Hello, > > > Please, which command should I use to stop and start the Samba/AD service > > correctly? > > personally I use for active directory: > > samba > > For standalone file server: > > smbd > > And I use kill to stop them. I use the pid in the pid file to do so. > Works fine for me. But it is probably better to use the infrastructure > of the operating system. But since I have multiple samba systems running > on a single node I go currently with the above but also specify the > config file. > > Cheers, > Thomas >