mount -t cifs //windows.box/path /mnt/local/path -o credentials=/root/cifs/cifs_credentials.txt,domain=COMPANYX,file_mode=0600,dir_mode=0700,uid=admin,gid=admin
I was getting this error:
[307906.131366] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE [307906.131374] CIFS VFS: Send error in SessSetup = -13 [307906.131575] CIFS VFS: cifs_mount failed w/return code = -13
While this can be caused by any permission problems sometimes the lack of more verbose log traces makes it harder to find the exact issue.
In my case this was related to the credentials file having spaces:
username = user password = password
Fixing it was a matter of trimming spaces out: