Solved

Mount.cifs Permission Denied

Posted on 2014-11-03
8
624 Views
Last Modified: 2014-11-05
Hello,

When I attempt to mount a drive to a Windows share, I receive a Permission Denied error:

sudo mount.cifs //server/share /mnt/mountpoint -o username=domain/username

However, I CAN mount the drive using smbclient with the same credentials:

smbclient //server/share -U domain/username

Any thoughts why mount.cifs fails, but smbclient works?

Thanks,

TB
0
Comment
Question by:TropicalBound
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 8

Expert Comment

by:Pepe2323
ID: 40419678
Hi

My first recommendation will be

Please verify the permission on the folder on you windows machine and try again mount the share folder.

mount with cifs is not same as smbclient

smbclient is ftp-like client to access SMB/CIFS resources on servers /mnt/mountpoint

Regards.

Also try to check the permissions on ur mount point
0
 
LVL 3

Author Comment

by:TropicalBound
ID: 40419730
Pepe2323,

I have verified the permissions on the Windows share.  It works everywhere except with the mount.cifs command.

I created the mount point just prior to issuing the mount command:

sudo mkdir /mnt/mountpoint

Thanks,

TB
0
 
LVL 1

Accepted Solution

by:
Anil_dasmala earned 500 total points
ID: 40420991
how about adding sec option. Please try if --verbose or /var/log/messages gives any hints
sudo mount.cifs //server/share /mnt/mountpoint -o username=username,domain=domainname,sec=ntlm --verbose
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Author Comment

by:TropicalBound
ID: 40421476
Below is the command I entered:
sudo mount.cifs //server/share /mnt/mountpoint -o username=user,domain=domain,sec=ntlm --verbose

Which prompts for both the root and domain user passwords:
[sudo] password for tropicalbound:
Password for user@//server/share:

This is the result:
mount.cifs kernel mount options: ip=192.168.xxx.xxx,unc=\\server\share,sec=ntlm,user=user,,domain=domain,pass=********
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

I notice that in the result, there are two commas between user=user and domain-domain:
user=user,,domain=domain.

This was not a typo on my part.  In the command, I put a single comma, but in the result, there are two, like the command is expecting another input.  Could this be related to the problem?

Thanks,

TB
0
 
LVL 1

Expert Comment

by:Anil_dasmala
ID: 40423307
Hmm, not sure about that extra comma,  Do you have special characters like , in password..?, just a guess
Looks like some guys got it working by setting sec=ntlmv2 or ntlmssp.
http://unix.aspcode.net/view/635395087004115229215016/mount-error-13-permission-denied

Do you see any messages in sys log..? /var/log/messages during this command is executed.
0
 
LVL 3

Author Comment

by:TropicalBound
ID: 40424241
Anil dasmala,

Yes, I have special characters in my password.  As a test, I reset my password to something simple, but I still receive the same error.  Sys log doesn't say anything more except for Logon Failure.  This is very odd since I can connect to the same server/share using Nautilus and the same credentials.

I think the issue resides on my Ubuntu box.  When I enter the command, the failure is instant, like it's not even attempting to connect to the server.

Are there any local permissions I need to perform this task?  I wouldn't think so as I am running the command using sudo.

Frustrating.

TB
0
 
LVL 3

Author Comment

by:TropicalBound
ID: 40424325
OK.  I still can't get it to work using "-o user=domain/user", but it DOES work if I use "-o user=user, dom=domain" (leaving out the -sec option).

I know for a fact it worked in the past as domain/user, but not now.  Who knows....

Thanks for all the help Anil dasmala
0
 
LVL 1

Expert Comment

by:Anil_dasmala
ID: 40424528
@TropicalBound, You have nailed it finally, another working combination of options, learnt . Thank you.
0

Featured Post

Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question