I am not able to locate smb.service nor mnb.service to start samba. F15 Host, previous OS instance, SAMBA server configured and working (before being replaced with F17). Installed Packages samba.x86_64 1:3.5.15-74.fc15.1 @updates samba-client.x86_64 1:3.5.15-74.fc15.1 @updates samba-common.x86_64 1:3.5.15-74.fc15.1 @updates samba-winbind-clients.x86_64 1:3.5.15-74.fc15.1 @updates # systemctl -a| grep -i samba nmb.service loaded active running SYSV: Starts and stops the Samba smbd and nmbd daemons used to provide SMB network services. smb.service loaded active running SYSV: Starts and stops the Samba smbd daemon used to provide SMB network services. Current F17 Host. Retrieved the samba config file but i did not find the corresponding systemd service files to start the services. F17 is a fresh install. I do not perform upgrades. Installed Packages samba.x86_64 2:3.6.5-86.fc17.1 @fedora samba-client.x86_64 2:3.6.5-86.fc17.1 @fedora samba-common.x86_64 2:3.6.5-86.fc17.1 @fedora samba-winbind.x86_64 2:3.6.5-86.fc17.1 @fedora samba-winbind-clients.x86_64 2:3.6.5-86.fc17.1 @fedora # systemctl -a| grep -i samba # systemctl -a| grep -i smb # systemctl -a| grep -i nmb It looks that i should have the corresponding .service files but i do not have them. Why?
The files are available in samba package: $ rpm -qlp http://kojipkgs.fedoraproject.org/packages/samba/3.6.5/86.fc17.1/x86_64/samba-3.6.5-86.fc17.1.x86_64.rpm |grep service /usr/lib/systemd/system/nmb.service /usr/lib/systemd/system/smb.service You can verify it locally with the same command (rpm -ql samba|grep service).
The samba related services smb.service, nmb.service and winvind.service are not enabled by default on F17 and hence not listed by 'systemctl -a'. iirc on F15 samba used SysV init scripts and systemd started them in the compatibly mode. This may explain why they were shown by 'systemctl -a'.
# rpm -ql samba|grep service /usr/lib/systemd/system/nmb.service /usr/lib/systemd/system/smb.service # chkconfig --list Note: This output shows SysV services only and does not include native systemd services. SysV configuration data might be overridden by native systemd configuration. ceph 0:off 1:off 2:off 3:off 4:off 5:off 6:off ebtables 0:off 1:off 2:off 3:off 4:off 5:off 6:off iscsi 0:off 1:off 2:off 3:off 4:off 5:off 6:off iscsid 0:off 1:off 2:off 3:off 4:off 5:off 6:off livesys 0:off 1:off 2:off 3:off 4:off 5:off 6:off livesys-late 0:off 1:off 2:off 3:off 4:off 5:off 6:off netconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:off network 0:off 1:off 2:on 3:on 4:on 5:on 6:off spice-vdagentd 0:off 1:off 2:off 3:off 4:off 5:on 6:off # systemctl -a | grep -i nmb.service # systemctl -a | grep -i smb.service # ls -la /usr/lib/systemd/system/nmb* -rw-r--r--. 1 root root 231 May 4 09:41 /usr/lib/systemd/system/nmb.service # ls -la /usr/lib/systemd/system/smb* -rw-r--r--. 1 root root 277 May 4 09:41 /usr/lib/systemd/system/smb.service Comparing the permissions to an enabled service... no difference. # ls -la /usr/lib/systemd/system/ssh* -rw-r--r--. 1 root root 283 Apr 6 16:26 /usr/lib/systemd/system/sshd.service # systemctl status smb.service smb.service - Samba SMB Daemon Loaded: loaded (/usr/lib/systemd/system/smb.service; disabled) Active: inactive (dead) CGroup: name=systemd:/system/smb.service # systemctl status nmb.service nmb.service - Samba NMB Daemon Loaded: loaded (/usr/lib/systemd/system/nmb.service; disabled) Active: inactive (dead) CGroup: name=systemd:/system/nmb.service # systemctl -a| grep -i samba nmb.service loaded active running Samba NMB Daemon smb.service loaded active running Samba SMB Daemon winbind.service loaded inactive dead Samba Winbind Daemon # systemctl status smb.service smb.service - Samba SMB Daemon Loaded: loaded (/usr/lib/systemd/system/smb.service; disabled) Active: active (running) since Mon, 11 Jun 2012 09:43:54 -0300; 4min 22s ago Process: 9761 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=0/SUCCESS) Main PID: 9762 (smbd) CGroup: name=systemd:/system/smb.service ├ 9762 /usr/sbin/smbd └ 9764 /usr/sbin/smbd Jun 11 09:43:54 ulquiorra.espada smbd[9761]: [2012/06/11 09:43:54.117543, 0] smbd/server.c:1107(main) # systemctl status nmb.service nmb.service - Samba NMB Daemon Loaded: loaded (/usr/lib/systemd/system/nmb.service; disabled) Active: active (running) since Mon, 11 Jun 2012 09:43:49 -0300; 4min 31s ago Process: 9757 ExecStart=/usr/sbin/nmbd $NMBDOPTIONS (code=exited, status=0/SUCCESS) Main PID: 9758 (nmbd) CGroup: name=systemd:/system/nmb.service └ 9758 /usr/sbin/nmbd So, the .service files were there. The issue can be narrowed to a less critical issue (but it is not insignificant): systemctl -a MUST list ALL services in ALL STATES, like chkconfig --list the MAN PAGE says: --all, -a When listing units, show all units, regardless of their state, including inactive units. When showing unit/job/manager properties, show all properties regardless whether they are set or not. So, it the unit existed and was inactive (never started) it should also be listed by systemctl -a ?
I think this is question to systemd team. I also assumed this is the case that *all* units are shown with 'systemctl -a' regardless of their state. Was it changed recently? I'm moving the bug to systemd so that a qualified answer could come from the right source.
"systemctl -a" only shows units that are loaded into systemd's memory. You may want to use: systemctl list-unit-files *** This bug has been marked as a duplicate of bug 748512 ***