One of our Linux servers (Debian 5) uses Windows shares mounted via cifs.
Each time, when the credentials are changing due to security policy, shares begins to be inaccessible for several hours, or until the Linux machine goes to be completely restarted.
Is there a way to flush the network passwords cache, to avoid this ? Samba restart (/etc/init.d/samba restart
) doesn't do anything, the system still uses outdated credentials.
Any help will be appreciated.
Perhaps
mount -oremount /path/to/cifs/share
can help?Since mounting a share requires credentials to be supplied, if these credentials change the share must be re-mounted with the new credentials.
You can use -o remount:
The networks samba drive was mounted via fstab, and the cache apparently kept until the restart.
So I made manual mount and it works flawlessly :
After this procedure, on my machine the cache was cleared, so I could make umount and mount via the fstab.
Alternatively, the cache is active until server restart, and after the new credentials will be applied via fstab configuration.
Similar issue but umount/mount did not work. It was because I had four mounts with the same CIFS ID to the same Server with the shares. By umounting them all, then mounting them again the cache was cleared.