Skip to content

Instantly share code, notes, and snippets.

@pantelis
Last active November 17, 2019 02:43
Show Gist options
  • Save pantelis/540a19262cacc841fb0a to your computer and use it in GitHub Desktop.
Save pantelis/540a19262cacc841fb0a to your computer and use it in GitHub Desktop.
Mount Windows share drives on CoreOS
# WARNING - THIS IN NOT a SHELL SCRIPT - JUST a LIST of COMMANDS
# based on https://github.com/coreos/coreos-overlay/issues/595 with links updated
# Build cifs-utils in a container and copy it into /tmp on the host.
$docker run -t -i -v /tmp:/host_tmp fedora /bin/bash
# On the container bash prompt
yum groupinstall -y "Development Tools" "Development Libraries"
yum install -y tar
yum install -y bzip2
curl http://ftp.samba.org/pub/linux-cifs/cifs-utils/cifs-utils-6.3.tar.bz2 | bunzip2 -c - | tar -xvf -
cd cifs-utils-6.3/
./configure && make
cp mount.cifs /host_tmp/
exit
#back at the host
$ sudo mkdir /mnt/foo
$ sudo /tmp/mount.cifs //198.51.100.23/foo /mnt/foo -o domain=zzz,username=xxx,password=yyy
$ mount | grep /mnt/foo
@yfhust
Copy link

yfhust commented Sep 2, 2018

I got "mount error(95): Operation not supported". Would you please help me to fix it?

@yfhust
Copy link

yfhust commented Sep 2, 2018

I figured it out! I have to add "vers=2.0" to work, as follows:
sudo /tmp/mount.cifs //198.51.100.23/foo /mnt/foo -o domain=zzz,username=xxx,password=yyy,vers=2\.0

@skupjoe
Copy link

skupjoe commented Nov 17, 2019

Thanks for your help! However, I don't think these steps need to be performed any longer under the latest version of CoreOS.

I was able to perform a mount -t cifs <address> -o sec=krb6,vers=3.0 just fine out of box once connected to my domain via KRB5 :)

$ which mount.cifs
/usr/sbin/mount.cifs

Here's my version info:

cat /etc/os-release
NAME="Container Linux by CoreOS"
ID=coreos
VERSION=2247.6.0
VERSION_ID=2247.6.0
BUILD_ID=2019-11-06-2138
PRETTY_NAME="Container Linux by CoreOS 2247.6.0 (Rhyolite)"
ANSI_COLOR="38;5;75"
HOME_URL="https://coreos.com/"
BUG_REPORT_URL="https://issues.coreos.com"
COREOS_BOARD="amd64-usr"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment