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.


1 Answer 1


Are you still experiencing the problem ? Have you found a workaround ?

When a username/password pair is invalid, it should not be retried. So this looks like a bug to me. You should probably discuss that on samba mailing list and/or formally report a bug. Be sure to respect good practice about bug reporting, like precisely state your system, samba version, etc.

  • we never did solve the issue; we had to work around it using a manual process. Everyone who used the mount had root access so they could remount using their own user account when the previous account in use expired.
    – Jonny
    Jun 18, 2014 at 21:52
  • Thanks for sharing. Interestingly, I saw your question while searching how to remove the need for users to practically have root permissions (or sudo, which comes close) to access smb shares. Currently we use smbnetfs with satisfaction (it was slow until tuned, now fine). Jun 19, 2014 at 5:30
  • Yes, I agree that FUSE is generally the best option for these sorts of problems, except where performance is critical. Unfortunately these machines are on a segregated network and we're quite limited on what software we can bring across.
    – Jonny
    Jul 4, 2014 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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