6

I had successful connections from my main workstation PC (which uses Fedora 29 Workstation) to my mother's laptop (Windows 7 HP) network share few times using mount.cifs, but since not too long it has become impossible for me to do it.

For example, using Nautilus, connecting to smb://192.168.0.2/Data asks for a credentials (although it should be stored permanently for this share already), and even when you enter a correct username and password, it does nothing but just prompts for how to login again.

Using mount -t cifs was also successful in the past but not anymore, since it returns an error as following:

[ruslan@sakuya ~]$ sudo mount -t cifs //192.168.0.2/Data .mount/samba -o username=ruslan,password=[mypassword],domain=WORKGROUP,iocharset=utf8,rw,file_mode=0777,dir_mode=0777
mount error(9): Bad file descriptor
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
[ruslan@sakuya ~]$ sudo mount -t cifs //PATCHOULI/Data .mount/samba -o username=ruslan,password=[mypassword],domain=WORKGROUP,iocharset=utf8,rw,file_mode=0777,dir_mode=0777
mount error(9): Bad file descriptor
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
[ruslan@sakuya ~]$ sudo mount -t cifs //192.168.0.2/Data .mount/samba
Password for ruslan@//192.168.0.2/Data:  **********
mount error(9): Bad file descriptor
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
[ruslan@sakuya ~]$ sudo mount -t cifs //PATCHOULI/Data .mount/samba
Password for ruslan@//PATCHOULI/Data:  **********
mount error(9): Bad file descriptor
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

dmesg isn't also very helpful on its' side:

[ 4342.451104] No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount.
[ 4342.455203] Status code returned 0xc0000008 STATUS_INVALID_HANDLE
[ 4342.455217] CIFS VFS: Send error in SessSetup = -9
[ 4342.455237] CIFS VFS: cifs_mount failed w/return code = -9

Specifying the PC name and/or removing any or all of options does not help in any way.

  • 1
    Does this Windows 7 system had some updates recently? serverfault.com/q/948263/78437 – duenni Jan 11 at 13:17
  • Yes, I saw the system update icon in the tray but haven't digged any further. Thank you very much for a hint, I will read the discussion and delete those updates if it will be necessary. – Ruslan Nigmatyanov Jan 11 at 13:21
5

As mentioned in the link above (KB 4480970 and or KB 4480960 breaks SMB2 connections to Windows 7 shares), there are two solutions:

  1. Delete one of, or both said updates from an elevated command prompt:

    wusa
    wusa /uninstall /kb:4480960 /quiet
    wusa /uninstall /kb:4480970 /quiet
    

Edit: KB 4480970 is the main suspect, so try to delete it first, reboot and see what happens after.

  1. As being said “However I can also confirm that the registry edit below... if the Windows 7 user accesses a share, and he is an administrator on the remote system, this should work”, again, in the elevated command prompt enter:

    reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f
    

Don't forget to reboot after you do anything from the above!

  • 1
    Registry Edit works for me! Thank you! – Hank 2 days ago

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.