Solved

Mount.cifs Permission Denied

Posted on 2014-11-03
8
556 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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Currently, there is not an RPM package available under the RHEL/Fedora/CentOS distributions that gives you a quick and easy way to allow PHP to interface with Oracle. As a result, I have included a set of instructions on how to do this with minimal …
This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
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.:
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…

760 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

18 Experts available now in Live!

Get 1:1 Help Now