Announcement

Collapse
No announcement yet.

Samba, "unrecognized service"

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Samba, "unrecognized service"

    "sudo service samba start" generates an error "unrecognized service".

    "sudo /etc/init.d/samba start" generates an error "samba: command not found".

    As user, "samba" generates a suggestion that I install something called samba4.

    Installing samba4 generates a whole 'nother world of errors.

    What the H is going on with samba?
    Last edited by dibl; Apr 01, 2012, 06:09 AM.

    #2
    Your first error messages mean that samba wasn't installed. Now that you have installed it, what are the problems?

    Comment


      #3
      Let me try again.

      Code:
      don@virtual-precise:~$ sudo apt-cache policy samba
      samba:
        Installed: 2:3.6.3-2ubuntu1
        Candidate: 2:3.6.3-2ubuntu1
        Version table:
       *** 2:3.6.3-2ubuntu1 0
              500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
              100 /var/lib/dpkg/status
      don@virtual-precise:~$ sudo service samba start
      samba: unrecognized service
      don@virtual-precise:~$ sudo /etc/init.d/samba start
      sudo: /etc/init.d/samba: command not found
      My most powerful troubleshooting tool, Google, found that, in addition to the samba package, I need samba-common and system-config-samba. Hmmm, I would have thought the samba package would have such needed support packages as dependencies, but oh well:

      Code:
      don@virtual-precise:~$ sudo apt-get install samba-common system-config-samba
      Reading package lists... Done
      Building dependency tree       
      Reading state information... Done
      samba-common is already the newest version.
      The following extra packages will be installed:
        libglade2-0 libuser1 python-central python-glade2 python-libuser
        python-support
      Suggested packages:
        python-gtk2-doc
      The following NEW packages will be installed:
        libglade2-0 libuser1 python-central python-glade2 python-libuser
        python-support system-config-samba
      Now does it work?

      Code:
      don@virtual-precise:~$ sudo service samba start
      samba: unrecognized service
      Sigh. Next step suggests that I run Alt-F2 "kdesudo system-config-samba", and doing this did bring up an error regarding the configuration file /etc/samba/smb.conf, which is legitimate as I had not yet made my configuration settings. But if the samba service won't run, it doesn't matter much about what the configuration file says!
      Last edited by dibl; Apr 01, 2012, 06:41 AM.

      Comment


        #4
        OK, progress. Good guidance for samba on *buntu is here.

        I'm not sure when this changed (it is not changed on Debian), but samba on *buntu is not a running service any more, it is only a daemon named smbd. EDIT: You also need the daemon nmbd -- see next post in thread!

        Code:
        don@virtual-precise:~$ ls /etc/rc5.d
        README         S01pppd-dns    S01saned         S02gpsd         S03rc.local
        S01dns-clean   S01pulseaudio  S01vmware-tools  S03grub-common  S75sudo
        S01kerneloops  S01rsync       S02acpi-support  S03ondemand
        but

        Code:
        don@virtual-precise:~$ ps aux | grep smbd
        don       3330  0.0  0.0   9376   928 pts/1    S+   09:49   0:00 grep --color=auto smbd
        "sudo testparm" spits 2 errors:

        Code:
        ERROR: state directory /var/lib/samba does not exist
        ERROR: cache directory /var/cache/samba does not exist
        then parses my /etc/samba/smb.conf file correctly. Googling the errors leads to a couple of launchpad bug reports:

        https://bugs.launchpad.net/ubuntu/+s...ba/+bug/695256
        https://lists.ubuntu.com/archives/ub...ry/048499.html

        And finally, using Alt-F2 "kdesudo systemsettings" I went into Systemsettings > Network and Connectivity > Sharing, and immediately observed this:



        sooooo .... more work and maybe more fixing is going to be needed here. There are no "old third party modules", so it's either a 12.04 bug with the kcm_kio thing, or something amiss with my fully-updated kubuntu-desktop suite.
        Last edited by dibl; Apr 01, 2012, 10:44 AM.

        Comment


          #5
          I wish I could state precisely which of my fiddling about fixed this issue, but I'll try to recap what I did. I did win the fight:



          I discovered that the second needed daemon, nmbd, was not in fact running, and refused to start. So, even though I just updated my 12.04 system this morning, I went ahead and ran

          Code:
          sudo apt-get update && sudo apt-get install --reinstall kubuntu-desktop
          Lo and behold a handful of packages were installed -- I should have captured their names but at that moment I had no faith that it was related to samba. There was nothing resembling a "kcm_kio" library, for example.

          Next, I reinstalled samba:

          Code:
          sudo apt-get install --reinstall samba
          and it installed with no error. At the end of that process, I saw both smbd and nmbd start up corrrectly -- I realized I had NOT seen that before.

          I reset my user's home folder for sharing, using Alt-F2 "kdesudo dolphin" and changing the properties to make it shared.

          I Alt-F2 "kdesudo systemsettings" opened systemsettings in super user mode, and I was able to open Network and Connectivity > Sharing and it opened correctly, without the error message above. I set my user name and my network password there.

          I shut down and restarted the system, and then after waiting 5 minutes I took a look from a Windows 7 system and was pleased to see the Precise server available, and my shared directory was there and opened correctly when given the correct user name and password.

          Yay.
          Last edited by dibl; Apr 01, 2012, 10:48 AM.

          Comment

          Working...
          X