I have a linux system which mounts Windows shares using cifs, configured in
/etc/fstab. The Windows fileserver it's connecting to is joined to an Active Directory domain. When I mount the shares, which I do manually, I am prompted for my Windows credentials for each mountpoint. These credentials, I understand, are cached by cifs and are used to reconnect to the share whenever the filesystem is used.
This poses a problem if I mount, enter my password, and then the password in Active Directory is changed. On filesystem access cifs tries to connect with its cache (old) password and this causes the account to be locked out after enough retries.
I cannot find any way to prevent cifs from doing this retrying when it encounters a "bad username/password" error from the Windows fileserver. I see the samba devs did discuss this back in 2005 but no fix was actually implemented.
Has anyone else hit this issue and are there any known workarounds? At the moment every time my password expires I have to unmount on every box it's being used, then change the password, then remount. Deviations from that order cause repeated lockouts as still-mounted cifs instances keep retrying.