I am trying to mount a folder from my embedded Linux system to a windows 7 computer. I keep getting Permission Denied when I try using a credentials file.
When I do it from command line as root it works. I type in
Code:
mount -t cifs //[IPAddress]/[Folder Path] /home/[user]/ShareFolder -o username=[Username] -o uid=[user]
when I do it from the fstab folder it works.
Code:
//[IPAdress]/[Folder Path] /home/[user]/ShareFolder cifs user,username=[Username],password=[Password],sec=ntlm,uid=[user],noauto 0 0
but if I switch to using a credentials file it does not work
Code:
//[IPAddress]/[Folder Path] /home/[user]/ShareFolder cifs user,credentials=/home/[user]/smbcredentials,user,sec=ntlm,uid=[user],noauto 0 0
the credentials file is
Code:
username=[username]
password=[password]
I have tried it with domain, and that didn't work. I turned on verbose to see what the difference was between the working fstab and the non-working fstab with credentials file.
working:
Code:
mount.cifs kernel mount options: ip=[IPAddress],unc=\[IPAddress]..., sec=ntlm,noauto,uid=500,gid=500,user=[WINDOWS USERNAME],prefixpath=[path to folder],pass=*
non-working:
Code:
mount.cifs kernel mount options: ip=[IPAddress],unc=\[IPAddress]..., sec=ntlm,noauto,uid=500,gid=500,user=[LINUX USERNAME],prefixpath=[path to folder],pass=*
the difference is that the working one uses the windows username as user and the non-working one uses the linux username. I'm not sure how to fix this. I did once add the domain to the credentials file, and that appeared correctly in the verbose line.