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 :
apt-get build-dep build-essential
apt-get install acl attr autoconf bison build-essential git\
debhelper dnsutils docbook-xml docbook-xsl flex gdb \
libacl1-dev libaio-dev libattr1-dev libblkid-dev libbsd-dev \
libcap-dev libcups2-dev libgnutls-dev libjson-perl \
libldap2-dev libncurses5-dev libpam0g-dev libparse-yapp-perl \
libpopt-dev libreadline-dev perl perl-modules pkg-config \
python-all-dev python-dev python-dnspython python-crypto \
xsltproc zlib1g-dev
cd /root/
wget https://download.samba.org/pub/samba/stable/samba-4.5.0.tar.gz
cd samba-4.5.0/
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--with-piddir=/var/run/samba \
--with-pammodulesdir=/lib/security \
--enable-fhs \
--without-ad-dc \
--without-systemd &&
make -j2
/etc/init.d/samba stop
make install
mv -v /usr/lib/libnss_win{s,bind}.so* /lib &&
ln -v -sf ../../lib/libnss_winbind.so.2 /usr/lib/libnss_winbind.so &&
ln -v -sf ../../lib/libnss_wins.so.2 /usr/lib/libnss_wins.so &&
mkdir -pv /etc/openldap/schema &&
mkdir /var/lock/samba &&
install -v -m644 examples/smb.conf.default /etc/samba &&
install -v -m644 examples/LDAP/README /etc/openldap/schema/README.LDAP &&
install -v -m644 examples/LDAP/samba* /etc/openldap/schema &&
install -v -m755 examples/LDAP/{get*,ol*} /etc/openldap/schema
#this one preventing correct run (and has been compiled and installed in /usr/lib/)
rm /usr/lib/x86_64-linux-gnu/libwbclient.so.0
#force OMV to add the "ntlm auth" parameter on each share edit, which if absent is preventing windows from accessing shares !
sed -i -e 's/^ -o "\[global\]" -n \\$/ -o "[global]" -n \\\n -o "ntlm auth = yes" -n \\/' /usr/share/openmediavault/mkconf/samba.d/10global
Alles anzeigen
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 \