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
Am 18.10.18 um 15:34 schrieb Rowland Penny via samba:> 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 gone > > No it hasn't, it is still therebut more or less empty on a proper distribution after migration to systemd and doing a dist-upgrade not even read the basic release announcement is dangerous [root at rh:~]$ ls /etc/init.d/ insgesamt 72K -rw-r--r-- 1 root root 19K 2018-05-25 12:06 functions -rwxr-xr-x 1 root root 4,5K 2018-05-25 12:06 netconsole -rwxr-xr-x 1 root root 7,5K 2018-05-25 12:06 network -rw-r--r-- 1 root root 1,2K 2018-07-18 13:39 README [root at rh:~]$ cat /etc/init.d/README You are looking for the traditional init scripts in /etc/rc.d/init.d, and they are gone? Here's an explanation on what's going on: You are running a systemd-based OS where traditional init scripts have been replaced by native systemd services files. Service files provide very similar functionality to init scripts. To make use of service files simply invoke "systemctl", which will output a list of all currently running services (and other units). Use "systemctl list-unit-files" to get a listing of all known unit files, including stopped, disabled and masked ones. Use "systemctl start foobar.service" and "systemctl stop foobar.service" to start or stop a service, respectively. For further details, please refer to systemctl(1). Note that traditional init scripts continue to function on a systemd system. An init script /etc/rc.d/init.d/foobar is implicitly mapped into a service unit foobar.service during system initialization. Thank you! Further reading: man:systemctl(1) man:systemd(1) http://0pointer.de/blog/projects/systemd-for-admins-3.html https://www.freedesktop.org/wiki/Software/systemd/Incompatibilities
On Thu, 18 Oct 2018 15:44:26 +0200 Reindl Harald via samba <samba at lists.samba.org> wrote:> > > Am 18.10.18 um 15:34 schrieb Rowland Penny via samba: > > 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 gone > > > > No it hasn't, it is still there > > but more or less empty on a proper distribution after migration to > systemd and doing a dist-upgrade not even read the basic release > announcement is dangerousThis is from a new Kubuntu 18.04 install: adminuser at kub1804:~$ ls /etc/init.d acpid cups nmbd smbd alsa-utils cups-browsed ntp spice-vdagent anacron dbus plymouth ssh apparmor grub-common plymouth-log udev apport hwclock.sh pppd-dns ufw avahi-daemon irqbalance procps unattended-upgrades bluetooth kerneloops rsync uuidd console-setup.sh keyboard-setup.sh rsyslog whoopsie cron kmod samba-ad-dc winbind cryptdisks mpd saned x11-common cryptdisks-early network-manager sddm Call that empty ? And what is a 'proper distribution' ? Rowland