Cannot start Samba

  • Hello ,
    After an update and some tweaks to smb.conf , I cannot start samba anymore.


    I reistalled samba and did; omv-mkconf samba , dpkg-reconfigure samba but still I cannot start samba.


    Also there is no samba file in /etc/init.d/


    root@jacksbox3:~# testparm
    Load smb config files from /etc/samba/smb.conf
    params.c:Section() - Empty section name in configuration file


    Anybody any suggestions?

    • Offizieller Beitrag

    What are your tweaks? Can you post smb.conf?

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Contents of samba init file for .5 OMV:


  • update


    When I want to make changes to openmediavault with web-interface, after clicking on aply-button, I get error;



    Failed to execute command 'export LANG=C; invoke-rc.d 'samba' stop 2>&1': invoke-rc.d: unknown initscript, /etc/init.d/samba not found.



    Where can I get a samba-script file to put in /etc/init.d/ ?


    I cannot remove --purge samba cause then all omv specific packages get deleted too.

    • Offizieller Beitrag

    apt-get install --reinstall samba


    or manually recreate it from what tekkbebe posted.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • No, I just gave you the file above.... Recreate it. /etc/init.d/samba and put in contents I just gave. Then try that before you do anything else. You said the samba init file was missing. It will not work without it. Also with samba there are 2 daemons that must be started. smbd and nmbd

  • I already tried reinstall; root@jacksbox3:/etc# apt-get install samba samba-common --reinstall
    Reinstalled the samba and samba-common package but no file in /etc/int.d/


    Now I manualy maked the samba file in /etc/init.d/ with help from tekkbebe and samba is running :)


    Put when I go to web-interface I still get error popup;


    Failed to execute command 'smbstatus -u 2>&1': params.c:Section() - Empty section name in configuration file. Can't load /etc/samba/smb.conf - run testparm to debug it



    here is my smb.conf ;


    #======================= Global Settings =======================
    [global]
    workgroup = WORKGROUP
    server string = %h server
    include = /etc/samba/dhcp.conf
    dns proxy = no
    log level = 0
    syslog = 0
    log file = /var/log/samba/log.%m
    max log size = 1000
    syslog only = yes
    panic action = /usr/share/samba/panic-action %d
    encrypt passwords = true
    passdb backend = tdbsam
    obey pam restrictions = yes
    unix password sync = no
    passwd program = /usr/bin/passwd %u
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    pam password change = yes
    socket options = TCP_NODELAY IPTOS_LOWDELAY
    guest account = nobody
    load printers = no
    disable spoolss = yes
    printing = bsd
    printcap name = /dev/null
    unix extensions = yes
    wide links = no
    create mask = 0777
    directory mask = 0777
    use sendfile = no
    aio read size = 16384
    aio write size = 16384
    null passwords = yes
    local master = yes
    time server = no
    wins support = yes


    #======================= Share Definitions =======================
    []
    path =
    printable = no
    create mask = 0755
    force create mode = 0644
    directory mask = 0755
    force directory mode = 0755


    invalid users =
    read list =

    • Offizieller Beitrag

    It doesn't like the empty share definition I'm sure. Delete all the lines after Share Definition.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I deleted evrything in the share definition and restarted samba.


    When i go to "services" on web-interfaces samba is running but still same error-popup apears;


    Failed to execute command 'smbstatus -u 2>&1': params.c:Section() - Empty section name in configuration file. Can't load /etc/samba/smb.conf - run testparm to debug it


    Also when I look at smb.conf , the part I deleted , is back again.


    It looks like some omv-scripts recreated the wrong smb.conf file.

    • Offizieller Beitrag

    You probably have bad leftovers in /etc/openmediavault/config.xml. Make a backup of that file and remove the bad share stuff from it.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Zitat von "ryecoaaron"

    You probably have bad leftovers in /etc/openmediavault/config.xml. Make a backup of that file and remove the bad share stuff from it.


    I see a lot of parts associated with "share" in the config.xml , I'm not sure what I can delete and what not.


    If I delete all samba and nfs shares web-interface, what parts off the config.xml I cannot delete?

    • Offizieller Beitrag

    Upload your config here and I will tell you what to delete.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I deleted the " Backup" share in Services - SMB/CIFS
    I deleted the " Muziek " and 'TVopnames" share in services - NFS


    I still see those shares under accesscontrol - shared folders , but didn't delete them there cause I was afraid the content would be deleted too.

    • Offizieller Beitrag

    You must have deleted the right stuff because I don't see anything in your config that needs to be removed. To fix samba, only the samba shares needed to be removed. You don't need to remove nfs shares or shared folders. So, no worries about losing content.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • samba doesn't start now;


    root@jacksbox3:~# /etc/init.d/samba start
    Starting Samba daemons: nmbd failed!


    ps I have system with LVM and I started with unpartitioned disks and then began with lvm-partition.


    Under accescontrol - shared folders there still is the "Backup" folder wich I deleted under SMB/CIFS,
    I cannot delete it under accescontrol - shared folders.



    Failed to execute command 'rm -fr '/media/884ea3a7-ada7-4f4f-b253-d4ed476fe9d2//' 2>&1': rm: kan ‘/media/884ea3a7-ada7-4f4f-b253-d4ed476fe9d2/aquota.user’ niet verwijderen : Bewerking niet toegestaan rm: kan ‘/media/884ea3a7-ada7-4f4f-b253-d4ed476fe9d2/aquota.group’ niet verwijderen : Bewerking niet toegestaan

    • Offizieller Beitrag

    Removing the samba share will not remove the shared folder. They are different. So, don't delete the shared folder until samba is working. If you answer the question wrong when deleting the shared folder, it will delete everything in that shared folder.


    After removing the lines in your /etc/openmediavault/config.xml, you need to remove them from the /etc/samba/smb.conf again.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Very strange I keep getting samba errors. I did;


    root@jacksbox3:~# testparm
    Load smb config files from /etc/samba/smb.conf
    params.c:Section() - Empty section name in configuration file.
    Error loading services.


    root@jacksbox3:~# apt-get install --reinstall samba
    Pakketlijsten worden ingelezen... Klaar
    Boom van vereisten wordt opgebouwd
    De status informatie wordt gelezen... Klaar
    0 pakketten opgewaardeerd, 0 pakketten nieuw geïnstalleerd, 1 opnieuw geïnstalleerd, 0 te verwijderen en 0 niet opgewaardeerd.
    Er moeten 0 B/7625 kB aan archieven opgehaald worden.
    Door deze operatie zal er 0 B extra schijfruimte gebruikt worden.
    Voorconfigureren van pakketten...
    (Database inlezen ... 33607 files and directories currently installed.)
    Voorbereiden om samba 2:3.5.6~dfsg-3squeeze9 te vervangen (door .../samba_2%3a3.5.6~dfsg-3squeeze9_i386.deb) ...
    Stopping Samba daemons: nmbd smbd.
    Uitpakken van vervangende samba ...
    Instellen van samba (2:3.5.6~dfsg-3squeeze9) ...
    Starting Samba daemons: nmbd failed!
    invoke-rc.d: initscript samba, action "start" failed.
    dpkg: fout bij afhandelen van samba (--configure):
    subproces installed post-installation script gaf een foutwaarde 1 terug
    configured to not write apport reports
    Fouten gevonden tijdens behandelen van:
    samba
    E: Sub-process /usr/bin/dpkg returned an error code (1)


    I'll post my config.xml and my smb.conf , can you please tell me what to delete and what not in both filles?
    I'm running out off ideas :(



    SMB.CONF


    • Offizieller Beitrag

    Delete the following lines from smb.conf:



    and under <smb> in smb.conf

    Code
    <share>
            </share>

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!