Mount cifs stopped working

I have a bedroom pc that runs Windows 10 and a living room pc that runs Fedora 32. Internet access is via a cable modem that connects to a router. The lan connection for both pc’s is via the router. All lan connections are wired (not wireless).

Until a few weeks ago, I was able to access files on my Windows 10 : C\temp01\ directory from my Fedora 31 pc via

sudo mount -t cifs //192.168.1.2/temp01 /mnt/disk1 -o 
username=*********,password=******,uid=******,vers=2.0

Since I never need to access the Linux pc from the Windows pc, I have never needed to install Samba.

Subsequently, only two things have changed.
(1) I upgraded to Fedora 32 (with no Samba installed).
(2) Windows 10 periodically installs updates.

I don’t know which change caused the problem. Symptoms (employing the -v option):

mount.cifs kernel mount options: ip=192.168.1.2,unc=\\192.168.1.2\temp01,vers=2.0,uid=1000,user=steve,pass=********
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
    [steve@localhost ~]$ dmesg | tail -7
    [210226.718523] usblp 3-4:1.0: usblp0: USB Bidirectional printer dev 11 if 0 alt 0 proto 2 vid 0x04F9 pid 0x0331
    [210384.012135] usblp0: removed
    [210384.525215] usblp 3-4:1.0: usblp0: USB Bidirectional printer dev 11 if 0 alt 0 proto 2 vid 0x04F9 pid 0x0331
    [232340.081576] CIFS: Attempting to mount //192.168.1.2/temp01
    [232340.098919] CIFS: Status code returned 0xc000006d STATUS_LOGON_FAILURE
    [232340.098937] CIFS: VFS: \\192.168.1.2 Send error in SessSetup = -13
[232340.098947] CIFS: VFS: cifs_mount failed w/return code = -13

I had preserved the old “man mount cifs” output and I compared it to the Fedora 32 “man mount cifs” output. I did not see any appreciable difference. Especially, the syntax appears to have not changed.

An old UnixSE query suggested examining the relevant /var/log/messages and var/log/syslog

Shown below are the relevant var/log/messages

    Dec  6 18:26:43 localhost systemd[1]: Starting Fingerprint Authentication Daemon...
    Dec  6 18:26:43 localhost audit[248270]: NETFILTER_CFG table=filter family=7 entries=0 op=xt_register pid=248270 subj=system_u:system_r:init_t:s0 comm="(fprintd)"
    Dec  6 18:26:43 localhost audit[248270]: NETFILTER_CFG table=broute family=7 entries=0 op=xt_register pid=248270 subj=system_u:system_r:init_t:s0 comm="(fprintd)"
    Dec  6 18:26:43 localhost audit[248270]: NETFILTER_CFG table=nat family=7 entries=0 op=xt_register pid=248270 subj=system_u:system_r:init_t:s0 comm="(fprintd)"
    Dec  6 18:26:43 localhost systemd[1]: Started Fingerprint Authentication Daemon.
    Dec  6 18:26:43 localhost audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=fprintd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
    Dec  6 18:26:43 localhost audit[248269]: USER_AUTH pid=248269 uid=1000 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:authentication grantors=pam_succeed_if,pam_localuser,pam_unix acct="steve" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
    Dec  6 18:26:43 localhost audit[248269]: USER_ACCT pid=248269 uid=1000 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:accounting grantors=pam_unix,pam_localuser acct="steve" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Dec  6 18:26:43 localhost audit[248269]: USER_CMD pid=248269 uid=1000 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='cwd="/home/steve" cmd=6D6F756E74202D76202D742063696673202F2F3139322E3136382E312E322F74656D703031202F6D6E742F6469736B31202D6F20757365726E616D653D73746576652C70617373776F72643D4F6E79782323333450696E742C7569643D73746576652C766572733D322E30 exe="/usr/bin/sudo" terminal=pts/0 res=success'
    Dec  6 18:26:43 localhost audit[248269]: CRED_REFR pid=248269 uid=0 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_localuser,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
    Dec  6 18:26:43 localhost audit[248269]: USER_START pid=248269 uid=0 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
    Dec  6 18:26:43 localhost kernel: CIFS: Attempting to mount //192.168.1.2/temp01
    Dec  6 18:26:43 localhost audit[248269]: USER_END pid=248269 uid=0 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
    Dec  6 18:26:43 localhost kernel: CIFS: Status code returned 0xc000006d STATUS_LOGON_FAILURE
    Dec  6 18:26:43 localhost kernel: CIFS: VFS: \\192.168.1.2 Send error in SessSetup = -13
    Dec  6 18:26:43 localhost kernel: CIFS: VFS: cifs_mount failed w/return code = -13
    Dec  6 18:26:43 localhost audit[248269]: CRED_DISP pid=248269 uid=0 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_localuser,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'

Attempting to examine the relevant /var/log/syslog gives

sudo tail -50 /var/log/syslog
tail: cannot open '/var/log/syslog' for reading: No such file or directory

You can do “ls /var/log” to see what actually is there. Changing over to systemd changes where some logs are located. “journalctl -x” displays the errors in the system logs. Look at the man page for journalctl to see what all the options do.

However, those messages seem like they might be selinux related. On your linux box try “sudo setenforce 0” and then see if you can connect and mount the directory. If so then it certainly is selinux related and that will need to be worked through. If not then it is cifs related. I note that your mount options use “vers=2.0”. it may be that with updates to windows that is no longer valid. The linux kernel by default uses version 3 to do mounts. Maybe the mount will work by simply removing that option to the command…
I just gave you 2 possible fixes and hopefully one will work. If not we try again.

1 Like

Thanks very much for the support.

No joy either removing the “vers=2.0” parameter or preceding the command with “sudo setenforce 0”.

Examining /var/log/README confirmed that the journalctl command should be used. Exploring the man page options, the output at the end of this response was created by (again) attempting the mounti cifs command and then issuing “journalctl -r”.

Followup Questions:
(1) Do I need to undo the effects of “sudo setenforce 0” to restore the system status? If so, how?

(2) In your opinion, given that the timing seems to coincide with the upgrade from Fedora 31 to Fedora 32, (I can’t swear to this) can you think of a change instituted in Fedora 32 that could be the source of the problem?

(3) Are you able to tell from the info in my original query + the journalctl messages below whether the problem is on my Linux pc rather than my Windows 10 pc (i.e. because of some coincidentally timed Windows 10
update)?

(4) I have double checked the Windows 10 settings and can find no problem. If the mount cifs strategy can not be made to work without Samba, and if the problem is in fact on the Linux pc, will installing Samba and then (my) researching Samba probably provide a workaround?

(5) Is there a general next investigative step for me to take?

Dec 08 10:12:09 localhost.localdomain audit[384439]: NETFILTER_CFG table=filter family=7 entries=0 op=xt_unregister pid=384439 subj=system_u:>
Dec 08 10:12:08 localhost.localdomain audit[384439]: NETFILTER_CFG table=broute family=7 entries=0 op=xt_unregister pid=384439 subj=system_u:>
Dec 08 10:12:08 localhost.localdomain audit[384439]: NETFILTER_CFG table=nat family=7 entries=0 op=xt_unregister pid=384439 subj=system_u:sys>
Dec 08 10:12:08 localhost.localdomain audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=>
Dec 08 10:12:08 localhost.localdomain systemd[1]: fprintd.service: Succeeded.
Dec 08 10:11:48 localhost.localdomain audit[385914]: CRED_DISP pid=385914 uid=0 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s>
Dec 08 10:11:48 localhost.localdomain audit[385914]: USER_END pid=385914 uid=0 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0>
Dec 08 10:11:48 localhost.localdomain sudo[385914]: pam_unix(sudo:session): session closed for user root
Dec 08 10:11:48 localhost.localdomain kernel: CIFS: VFS: cifs_mount failed w/return code = -111
Dec 08 10:11:48 localhost.localdomain kernel: CIFS: VFS: Error connecting to socket. Aborting operation.
Dec 08 10:11:48 localhost.localdomain kernel: CIFS: Attempting to mount //192.168.1.1/temp01
Dec 08 10:11:48 localhost.localdomain audit[385914]: USER_START pid=385914 uid=0 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:>
Dec 08 10:11:48 localhost.localdomain sudo[385914]: pam_unix(sudo:session): session opened for user root by (uid=0)
Dec 08 10:11:48 localhost.localdomain audit[385914]: CRED_REFR pid=385914 uid=0 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s>
Dec 08 10:11:48 localhost.localdomain sudo[385914]:    steve : TTY=pts/0 ; PWD=/home/steve ; USER=root ; COMMAND=/usr/bin/mount -v -t cifs //>
Dec 08 10:11:48 localhost.localdomain audit[385914]: USER_CMD pid=385914 uid=1000 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t>
Dec 08 10:11:48 localhost.localdomain audit[385914]: USER_ACCT pid=385914 uid=1000 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_>
Dec 08 10:11:38 localhost.localdomain audit[385887]: CRED_DISP pid=385887 uid=0 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s>
Dec 08 10:11:38 localhost.localdomain audit[385887]: USER_END pid=385887 uid=0 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0>
Dec 08 10:11:38 localhost.localdomain sudo[385887]: pam_unix(sudo:session): session closed for user root
Dec 08 10:11:38 localhost.localdomain kernel: CIFS: VFS: cifs_mount failed w/return code = -13
Dec 08 10:11:38 localhost.localdomain kernel: CIFS: VFS: \\192.168.1.2 Send error in SessSetup = -13
Dec 08 10:11:38 localhost.localdomain kernel: CIFS: Status code returned 0xc000006d STATUS_LOGON_FAILURE
Dec 08 10:11:38 localhost.localdomain kernel: CIFS: Attempting to mount //192.168.1.2/temp01
Dec 08 10:11:38 localhost.localdomain audit[385887]: USER_START pid=385887 uid=0 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:>
Dec 08 10:11:38 localhost.localdomain sudo[385887]: pam_unix(sudo:session): session opened for user root by (uid=0)
Dec 08 10:11:38 localhost.localdomain audit[385887]: CRED_REFR pid=385887 uid=0 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s>

Installing samba on the linux box won’t help. That is so you can set up a server using smb so others can connect to your server. All you are trying to do is mount a shared directory from the windows box which doe not require anything extra.

Those cifs errors indicate unable to connect to the socket followed by a login failure. I would first verify the config for the share on the windows box and make certain the directory is actually shared. Following that I would verify my user name and password match what is used on the windows box. It is possible that the windows update altered something, not in the users credentials but possibly in the sharing config. It also could be the firewall on the windows box is now blocking the connection. The failure to connect is the real issue here. The failure of the login naturally follows with no connection established.

As far as selinux goes there are 2 ways to do that. If you are sure it was in enforcing mode to start then repeating the setenforce command with a 1 instead of 0 will turn enforcing back on. If you are not sure what mode it was in then a reboot will restore the default.

I really don’t think anything changed on the linux box that would interfere with cifs mounting the windows drive, those 2 earlier suggestions were just possibilities and the easiest to check.

Problem solved : thank you very much for the diagnosis. It was coincidental timing of a Windows 10 update around the same time that I upgraded from Fedora 31 to Fedora 32. Windows 10 reset one of the network parameters. I keep an informal journal of my original installation settings, saw and corrected the pertinent discrepancy, and solved the problem.

2 Likes

Congrats: The devil is in the details.
That is a perfect example of why keeping a record of settings is important.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.