Link to home
Start Free TrialLog in
Avatar of TropicalBound
TropicalBound

asked on

Mount.cifs Permission Denied

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
Avatar of Pepe2323
Pepe2323

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
Avatar of TropicalBound

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of Anil_dasmala
Anil_dasmala

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
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.
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
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
@TropicalBound, You have nailed it finally, another working combination of options, learnt . Thank you.