None of the solutions worked and I ended up writing an automount script, which works well but seems to have the side effect that my system is not shutting down properly as described in this thread. I see that one of the last messages is the unmount of the cifs script. When I disable the script, I can shutdown fine. Any idea why this could be? Could it be that I have to write an unmount service as well?
Here is my script
[Unit]
Description=cifs mount script
ConditionPathExists=/home/user/NAS
[Mount]
What=//fritz.box/FRITZ.NAS/WDCWDS-100T2B0A-00SM50-01/
Where=/home/user/NAS
Options=vers=1.0,username=user,password=pass,rw
Type=cifs
TimeoutIdlesec=10
[Install]
WantedBy=multi-user.target
@TriMoon I was asking a general question. I do post logs when I regard it as necessary.