After switching to systemd, I noticed that the >=net-fs/samba-4.1.0 ebuilds don't install a samba.service file to start samba 4 as an AD server. I'll attach a diff to the ebuild and a samba.service unit that atm goes into ${FILESDIR}/4.1. Perhaps it can be placed in ${FILESDIR} to be available to the 4.0 revisions, too, but I'll leave that to the maintainer. Reproducible: Always
Created attachment 362562 [details] samba.service
Created attachment 362564 [details, diff] samba-4.1.0-r1.ebuild.diff
I guess currently installed unit files are not enough for samba-4 ?
(In reply to Pacho Ramos from comment #3) > I guess currently installed unit files are not enough for samba-4 ? No, they are not enough. The current samba-4.1 ebuild only installs unit files for nmbd/smbd/winbindd. But in AD DC mode these daemons are not supposed to be started individually. In this case they are started by the "samba" binary (depending on the operation mode).
Created attachment 363914 [details] Samba-4 systemd unit file, non-forking version According to [1] unit files should not use Type=forking. This unit file now uses Type=simple and logs to systemd's journal. [1] http://wiki.gentoo.org/wiki/Systemd/Ebuild_policy
+ 27 Nov 2013; Pacho Ramos <pacho@gentoo.org> +files/samba.service, + samba-4.1.2.ebuild: + Add a samba.service unit file (#490394 by Daniel Klaffenbach) +
(In reply to Daniel Klaffenbach from comment #5) > Created attachment 363914 [details] > Samba-4 systemd unit file, non-forking version > > According to [1] unit files should not use Type=forking. This unit file now > uses Type=simple and logs to systemd's journal. > > [1] http://wiki.gentoo.org/wiki/Systemd/Ebuild_policy I'm not sure which Type guideline Samba doesn't quite obey with but in general the Samba AD should be run as a daemon and not in interactive mode. And to start it as a daemon with systemd the forking version is required.
(In reply to Chris Smith from comment #7) The systemd ebuild policy has been changed within the last year to favor forking when appropriate. Please file a new bug if another adjustment to samba needs to be made.