Solved

Mount.cifs Permission Denied

Posted on 2014-11-03
8
585 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Linux Copy Command - All Files inc Directory 1 57
centos linux 65 159
number in printf 13 33
PHP error function not working on AWS 10 75
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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.

830 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