Bug 830589 - f17 lacks mnb.service smb.service so samba server cannot be started
Summary: f17 lacks mnb.service smb.service so samba server cannot be started
Keywords:
Status: CLOSED DUPLICATE of bug 748512
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 17
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-10 19:48 UTC by Reartes Guillermo
Modified: 2012-06-11 15:01 UTC (History)
14 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-06-11 15:01:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Reartes Guillermo 2012-06-10 19:48:52 UTC
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?

Comment 1 Alexander Bokovoy 2012-06-11 06:43:04 UTC
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).

Comment 2 Sumit Bose 2012-06-11 07:12:11 UTC
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'.

Comment 3 Reartes Guillermo 2012-06-11 12:55:20 UTC
# 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 ?

Comment 4 Alexander Bokovoy 2012-06-11 13:26:34 UTC
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.

Comment 5 Michal Schmidt 2012-06-11 15:01:51 UTC
"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 ***


Note You need to log in before you can comment on or make changes to this bug.