WSL: CIFS version 1.0 no longer mountable
Windows Version
Microsoft Windows [Version 10.0.19045.5854]
WSL Version
2.5.9.0
Are you using WSL 1 or WSL 2?
- WSL 2
- WSL 1
Kernel Version
6.6.87.2-1
Distro Version
Ubuntu 22.04.4 LTS
Other Software
cifs-utils 2:6.14-1ubuntu0.3 amd64
Repro Steps
Trying to mount an old NAS with CIFS/SMB version 1.0 that worked perfectly up until a few days to a couple of weeks ago. The NAS is still mountable on my other Linux devices as well as in Windows as a network drive in the file explorer.
fstab entry:
//<nas IP>/media /mnt/nas cifs credentials=/home/<username>/.smbcredentials,iocharset=utf8,noauto,user,vers=1.0,forcegid,forceuid 0 0
Command to run:
mount /mnt/nas/
Expected Behavior
The NAS should be mounted and accessible at /mnt/nas as it has always been before
Actual Behavior
Mount command output:
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
Relevant dmesg output:
[168302.564357] vers=1.0 (cifs) mount not permitted when legacy dialects disabled
[168302.564798] CIFS: VFS: vers=1.0 (cifs) mount not permitted when legacy dialects disabled
Diagnostic Logs
I can mount the Windows Network drive by running sudo mount -t drvfs Z: /mnt/nas. I can’t run ls though because it gives the error “ls: reading directory ‘nas’: Invalid argument” but I can run cat on files that I know exist on the NAS if I mount it like this and I can navigate through sub directories as long as I know their names.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 21
@alkanen it should be pretty easy if you have a working WSL instance at the moment. Just clone the kernel repo, make the change in
Microsoft/config-wsl(or Microsoft/config-wsl-arm64` if you’re on ARM64) and then follow the instructions to build and install the kernel. If you have problems, please feel free to ping me on this issue@alkanen
You should do the same with modules.vhdx. The .wslconfig should look like this:
Hi,
I can confirm the issue and the solution from @chessturo
I have recompiled the kernel, created modules.vhdx and changed in .wsl-config the related options and it works like a charm.
Thanks.
OK thank you for the context.
@chessturo: This seems to be caused by a kernel config change.
In WSL 2.4.13:
While this is unset the latest kernel:
@alkanen: This should be fixed in 2.6.0. Can you run:
wsl --update --pre-releaseand see if that solves the issue ?Same as #13031, #12987 and #12983. https://github.com/microsoft/WSL2-Linux-Kernel/blob/linux-msft-wsl-6.1.y/arch/x86/configs/config-wsl#L3534 https://github.com/microsoft/WSL2-Linux-Kernel/blob/linux-msft-wsl-6.6.y/arch/x86/configs/config-wsl#L7173