Solved

Mount.cifs Permission Denied

Posted on 2014-11-03
8
566 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
  • 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
 
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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

919 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now