We have a windows XP share entry in our FSTAB that works as follows:
//MAIN/StorageD /mnt/storaged cifs username=admin,password='',uid=1001,gid=1000,iocharset=utf8,file_mode=0777,dir_mode=0777,noperm 0 0
But the entry for a Windows 7 box does not:
//MAIN-WIN7/Win7VM /mnt/Win7VM cifs username=main,password='',uid=1001,gid=1000,iocharset=utf8,file_mode=0777,dir_mode=0777,noperm 0 0
The directory /mnt/Win7VM is set to 777 permissons and owned by user 1001
So we try to debug a bit and mount manually...
Just as a check, the following works:
mount -t cifs '//MAIN/backupx' /mnt/backupx -o username=Admin,password=''
But for the windows 7 machine, this does not work.
mount -t cifs '//MAIN-WIN7/Win7VM' /mnt/Win7VM -o username=Main,password=''
As I get the error (which is famous I guess):
root@debian:/home/user# mount -t cifs //MAIN-WIN7/Win7VM /mnt/Win7VM -o username=Main,password='',sec=ntlm
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
So, I spend hours searching, checking, and trying to do the following:
Checked settings:
- Workgroup is "WORKGROUP"
- Domain is "MAIN-WIN7"
- User is "Main"
- Password is not set
- Share is Win7VM
- Share is available through network shares in windows
SMBTREE lists:
root@debian:/home/user# smbtree
Enter root's password:
WORKGROUP
\\MAIN-WIN7
\\MAIN-WIN7\Win7VM
- Changed Windows security policy settings of "Microsoft Network Client: Send un-encrypted passwords to third party" to "Enabled"
- Changed Windows security policy of "Network Security: LAN manager authentication level in to send LM & NTLM - use NTLMv2 session security if negotiated"
- Turned off all anti virus and firewalls
- Adding "sec=ntlm" switch as in "/mnt/Win7VM -o username=Main,password='',sec=ntlm"
- Adding domain to user as in "MAIN-WIN7/Main"
- Using "mount.cifs" instead of "mount -t cifs"
- CHMOD mount directory to 777 CHOWN mount directory to user "1001" and Group to "user" (will need this for fstab entry if I can get it to mount manually)
Share is on Windows 7 Ultimate and Client with permission errors is Debian Wheezy.
Now I am out of searching terms and ideas. I thought this would be simple; now I have wasted hours. Anyone got any ideas? Its probably something simple right?
Edit:
Forgot the dummy check of trying to access the share from a windows computer. It did not work leading me to investigate more windows settings which led me to the solution posted below.
sec=ntlm
option which happened to be the key in my case. Also worth a read: askubuntu.com/questions/580069/…