[clug] Hosted Office 365 - Sharepoint - Linux - rsync
George at Clug
Clug at goproject.info
Sun Mar 1 00:15:16 MST 2015
(to add a little more info)
Our company uses hosted Office 365 and I would like to automatically
and routinely back up files to a Linux server, say each night.
Does anyone else do this activity ? I will guess I am the only
person wanting to do so.
My research suggested to map a share using webdav and then use rsync
to copy the files to the linux backup computer.
# apt-get install davfs2
# dpkg-reconfigure davfs2
# lsmod | grep coda
# modprobe coda
# cat /etc/modules
# echo coda >> /etc/modules
# lsmod | grep coda
I then tried to mount the Sharepoint site using;
# mount -t davfs "https://mydomain.sharepoint.com/site1name/"
and I have tried using;
mount -t davfs "https://mydomain.sharepoint.com/site1name/" -o
When prompted for user name and password I have tried the following;
User.Name at mydomain.onmicrosoft.com
The error message after entering username and password is;
/sbin/mount.davfs: Mounting failed.
The above works well to mount my own webdav server, but not for
sharepoint, I believe the issue is related to "Your sharepoint-server
may use windows-authentication. The neon-library used by davfs2
supports NTLM and Kerberos. But you will have to set up your system to
enable these authentication shemes to be used by neon".
I turned on debug most and found this in the syslog
Mar 1 17:54:15 co2kvm1 mount.davfs: [hdr] X-MSDAVEXT_Error: 917656;
Mar 1 17:54:15 co2kvm1 mount.davfs: Header Name: [x-msdavext_error],
Mar 1 17:54:15 co2kvm1 mount.davfs: [hdr] X-IDCRL_AUTH_PARAMS_V1:
IDCRL Type="BPOSIDCRL", EndPoint="/_vti_bin/idcrl.svc/",
Mar 1 17:54:15 co2kvm1 mount.davfs: Header Name:
[x-idcrl_auth_params_v1], Value: [IDCRL Type="BPOSIDCRL",
The user receives this error because the session cookie for SharePoint
Online has expired and must be “refreshed” in order to
successfully access the mapped network drive again.
Presently this behavior is by design. We are trying to improve it. If
there is any updates, we will inform you.
However, in newer versions of davfs2, support for NTLM authentication
available when using libneon linked with openssl. This means I am
mount my Sharepoint folders made available via WebDAV, instead seeing
message "Could not authenticate to server: ignored NTLM challenge".
davfs2 using libneon27 instead of libneon27-gnutls solves this
Please consider switching davfs2 back to use libneon27.
More information about the linux