samba 4.5 installation. If you need it ...

  • EDIT : don't do that, it seems that samba becomes unstable after upgrading to 4.5 (crashes on many files transfer)



    So if you still want to try :



    Hi all. I have setup a new NAS with openmediavault version 2.2.8, and I am suffering from numerous bugs from the samba package, which is very old (3.6.6).


    My major bug : file names get "mangled" if they contain some characters, among ":" or "~". And if I set up the option "mangled names = no", then files are renamed when copied in the share : "~" gets renamed to ":" and then file is unreachable to windows ... !



    So I managed to install (in a VM) samba 4.5 (the brand new one !), which seems to be more user friendly with this bug. So here I share the steps I followed, please tell me if you find something particularly wrong (other than brute replacing samba in place, since it has been marked as a dependancy for openmediavault and hence cannot be "apt-get remove"d without removing omv ...) :


    :!: note that for an (yet) unknown reason, this does not work on my physical machine, I get no samba logs, and can't access shares right now :!:
    :!: /!\ I hurge you to try first in a VM, to see if it works for you, because those steps could break your installation /!\ :!:


    I hope I have forgotten nothing :


    You might want to add the parameter "ntlm auth = yes" to the [global] section of your "/etc/smb.conf" in order to get your shares working under windows(10) (or edit a share for the parameter to appear).


    Note that any update of OMV for the file "/usr/share/openmediavault/mkconf/samba.d/10global" will break your shares (this particular ntlm auth parameter), and you will have to launch again the following command and then add it to your smb.conf or edit a share :



    :!: before launching this command, check if the file :
    - is missing the line -o "ntlm auth = yes"
    - is still havine the line (with as many spaces as the sed contains) -o "\[global\]" -n \

    Code
    sed -i -e 's/^  -o "\[global\]" -n \\$/  -o "[global]" -n \\\n  -o "ntlm auth = yes" -n \\/'    /usr/share/openmediavault/mkconf/samba.d/10global
  • solved my 2 issues :


    1) I had not installed all the packages listed in the apt list, before compiling. Did that, then re-compiled / installed and got logs


    2) in those logs, samba told me that it did not find my user... in the end, it was not understanding the user_database from the previous version !


    so I ended in :


    mv /var/lib/samba/private/passdb.tdb /var/lib/samba/private/passdb.tdb.old
    passwd -a myuser



    and now I get access to my shares again (with samba 4.5)

Jetzt mitmachen!

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