Summary: | net-fs/samba-4.2.8-9 - samba.service should only be installed when USE=addc is set | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Juergen Rose <rose> |
Component: | Current packages | Assignee: | Gentoo's SAMBA Team <samba> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bkohler, dracwyrm, gentoo, gentoo, joost.ruis |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Juergen Rose
2016-02-06 07:52:20 UTC
Same on my system. A quick and dirty hack that one probably shouldn't do: # cd /usr/sbin # ln -s smbd samba # systemctl restart samba I did this so the official systemd unit was not modified in case that is the fix. Then the upgrade will be easier without collisions. The issue still happens, also with samba-4.2.9. I also created the link from /usr/sbin/smbd to /usr/sbin/samba. 'systemctl status samba' does not show any errors, but it seems me, that there are no running samba server or NetBIOS name server processes. root@impala:/usr/sbin(310)# systemctl status samba ● samba.service - Samba AD server Loaded: loaded (/usr/lib64/systemd/system/samba.service; disabled; vendor preset: enabled) Active: inactive (dead) Mar 27 08:44:02 impala systemd[1]: Stopped Samba AD server. Mar 27 08:44:02 impala systemd[1]: Started Samba AD server. Mar 27 08:44:03 impala samba[23057]: smbd version 4.2.9 started. Mar 27 08:44:03 impala samba[23057]: Copyright Andrew Tridgell and the Samba Team 1992-2014 Mar 27 08:49:03 impala systemd[1]: Stopping Samba AD server... Mar 27 08:49:03 impala systemd[1]: Stopped Samba AD server. Mar 27 08:49:17 impala systemd[1]: Stopped Samba AD server. Mar 27 08:49:40 impala systemd[1]: Started Samba AD server. Mar 27 08:49:40 impala samba[23311]: smbd version 4.2.9 started. Mar 27 08:49:40 impala samba[23311]: Copyright Andrew Tridgell and the Samba Team 1992-2014 root@impala:/usr/sbin(311)# ps -ef | grep nmb root 23988 17351 0 09:03 pts/5 00:00:00 grep --colour=auto nmb root@impala:/usr/sbin(312) One access with 'smbclient -U rose //impala/tmp' from impala without entering a password was possible. All subsequent attemps to do 'smbclient -U rose //impala/tmp' from impala or other systems with or without entering a password failed with: root@impala:/usr/sbin(314)# smbclient -U rose //impala/tmp/ Enter rose's password: Connection to impala failed (Error NT_STATUS_CONNECTION_REFUSED) I set "log file = /var/log/samba/log.%m" in /etc/samba/smb.conf. And as you can see from comment 2, I started samba.service today, i.e. at Mar 27 08:49:17, but there are no changes to the log files since yesterday: root@impala:/root(10)# ll /var/log/samba/ total 8 -rw-r--r-- 1 root root 0 Mar 26 21:20 log. -rw-r--r-- 1 root root 0 Mar 26 21:20 log.192.168.1.60 -rw-r--r-- 1 root root 0 Mar 26 21:20 log.leopard -rw-r--r-- 1 root root 768 Mar 26 21:21 log.nmbd -rw-r--r-- 1 root root 3167 Mar 26 21:51 log.smbd I can confirm that this issue still exists. This samba.service is to start the Samba Active Directory Domain Controller service (aka ADDC) and the corresponding USE=addc flag is what controls whether a /usr/sbin/samba binary is installed or not. For a regular samba fileserver, you should be starting smbd.service (and possibly nmbd.service) instead. That said, the samba ebuild probably shouldn't be installing samba.service unless USE=addc is set. *** Bug 573524 has been marked as a duplicate of this bug. *** I plan to add something like this to the newer ebuilds: --- a/net-fs/samba/samba-4.11.4-r1.ebuild +++ b/net-fs/samba/samba-4.11.4-r1.ebuild @@ -267,11 +267,12 @@ multilib_src_install() { newconfd "${CONFDIR}/samba4.confd" samba systemd_newtmpfilesd packaging/systemd/samba.conf.tmp samba.conf + use addc || rm "${D}/$(systemd_get_systemunitdir)/samba.service" || die + # Preserve functionality for old gentoo-specific unit names dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service" dosym smb.service "$(systemd_get_systemunitdir)/smbd.service" dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service" - fi if use pam && use winbind ; then The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a19e6bd0004fdf91141e798b405b069412fa114 commit 6a19e6bd0004fdf91141e798b405b069412fa114 Author: Ben Kohler <bkohler@gentoo.org> AuthorDate: 2020-02-09 14:40:02 +0000 Commit: Ben Kohler <bkohler@gentoo.org> CommitDate: 2020-02-09 14:46:38 +0000 net-fs/samba: revbump to switch to upstream's systemd units Switch to upstream's packaged systemd units with new filenames. Add symlinks to preserve existing setups. Remove unused samba.service when addc is disabled. Fix minor whitespace issue in IUSE. Bug: https://bugs.gentoo.org/692602 Closes: https://bugs.gentoo.org/573976 Package-Manager: Portage-2.3.88, Repoman-2.3.20 Signed-off-by: Ben Kohler <bkohler@gentoo.org> net-fs/samba/samba-4.11.6-r1.ebuild | 314 ++++++++++++++++++++++++++++++++++++ 1 file changed, 314 insertions(+) |