LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-12-2015, 05:16 PM   #1
tonj
Member
 
Registered: Sep 2008
Posts: 546

Rep: Reputation: 37
centos 5 machine plagued with 'mount error 13 = Permission denied'


I have a centos 5.10 machine (A) 64bit that is trying to mount a shared folder on another centos 5.9 machine (B) 32bit
The command I'm using on machine-A is:
Code:
#  mount -t cifs -o username=<my-user>,password=<my-password> //ip-machine-B/share /media/machine-B
This above command works perfectly on a centos 6 machine on the same lan. It connects to machine B and mounts the shared folder no problem. However the exact same command on the centos 5 (A) machine always gives:
Quote:
mount error 13 = Permission denied
I've watched the mount attempt in wireshark on machine-B and it throws:
Code:
SMB Tree Connect AndX Response, Error: STATUS_WRONG_PASSWORD
but the password I'm using is correct. I figure somehow machine-A just isn't sending the password properly or isn't sending the password at all. I've also tried using a credentials file in the mount command but I still get the permission denied error.
I know the problem must be with machine-A but how do I fix this?
 
Old 03-12-2015, 09:21 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Any characters in the password that might be interpreted by the shell as special? ('$' for example)

Can you try wrapping the username+password section of the command in single quotes?
 
Old 03-13-2015, 05:17 AM   #3
tonj
Member
 
Registered: Sep 2008
Posts: 546

Original Poster
Rep: Reputation: 37
thanks for your response, there are no special characters in the password.
since my last post I rebooted machine-A, the mount command still doesn't work but this time I'm getting:
Quote:
mount: block device //machine-B/share is write-protected, mounting read-only
mount: cannot mount block device //machine-B/share read-only
I've tried putting both single and double quotes around the username+password section of the command like you said but it made no difference.
 
Old 03-13-2015, 11:10 PM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
If you leave 'password=...' out of the arguments you should get prompted for it, could you give that a try?
 
Old 03-14-2015, 04:14 AM   #5
tonj
Member
 
Registered: Sep 2008
Posts: 546

Original Poster
Rep: Reputation: 37
yes thanks I tried that, it did prompt for the password but still get the same error:
Quote:
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
this is baffling because other computers on my lan can connect to the 'share' just fine using the same username and password. I have a windows 7 machine and two centos 6 machines and both can mount the share first time every time. I can only conclude that machine-A (centos 5 64 bit) is missing something but I don't know what it is.
 
Old 03-14-2015, 04:55 PM   #6
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
There's nothing mounted on /media/machine-B already is there?
 
Old 03-14-2015, 05:06 PM   #7
tonj
Member
 
Registered: Sep 2008
Posts: 546

Original Poster
Rep: Reputation: 37
no, this is the only mount being tried on machine-B from machine-A
 
Old 03-14-2015, 06:01 PM   #8
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Can you try adding 'sec=ntlmssp' to the mount options?
 
Old 03-15-2015, 04:36 AM   #9
tonj
Member
 
Registered: Sep 2008
Posts: 546

Original Poster
Rep: Reputation: 37
thankyou yes I'be tried both sec=ntlmssp and sec=ntlm but I still get the error:
Quote:
mount: block device //machine-B/share is write-protected, mounting read-only
mount: cannot mount block device //machine-B/share read-only
 
Old 03-15-2015, 05:09 AM   #10
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
If you try a mount with verbose ('-v') it may give some more detail

Also have you tried specifying the domain?
 
Old 03-15-2015, 04:33 PM   #11
tonj
Member
 
Registered: Sep 2008
Posts: 546

Original Poster
Rep: Reputation: 37
using the -v flag gives exactly the same output as above.
I'm a bit foggy regarding the domain. The share is on my lan so how would I do that?
 
Old 03-15-2015, 04:44 PM   #12
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
The RHEL system sharing the directory would be running samba, if you read https://access.redhat.com/documentat...nfiguring.html you should be able to determine the servers settings for authentication.
 
Old 03-15-2015, 05:00 PM   #13
tonj
Member
 
Registered: Sep 2008
Posts: 546

Original Poster
Rep: Reputation: 37
thankyou for that link. After reading some docs I installed samba-client.x86_64 and tried with:
Quote:
# smbclient //<hostname>/<sharename> -U <username>
and it gave:
Quote:
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.33-3.40.el5_10]
Server not using user level security and no password supplied.
smb: \>
that's weird because other machines on the lan have no problem seeing user level security and password.
I also tried
Quote:
mount -v -t cifs -o dom=WORKGROUP,sec=ntlmssp,username=<user>,password=<password> //machine-B/share /media/<machine-B-share
and it gave:
Quote:
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
it's confusing, one minute the error is cannot mount block device //machine-B/share read-only and the next it's Permission denied
one problem with the docs is they're all gui demo's, however my machines at both ends are console only.

Last edited by tonj; 03-15-2015 at 05:03 PM.
 
Old 03-15-2015, 05:48 PM   #14
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Anything interesting in the logs on the server side after a mount attempt? Could you please check that cifs module is present on the RHEL 5 client (lsmod | grep cifs)?

Last edited by kbp; 03-15-2015 at 05:51 PM.
 
Old 03-18-2015, 03:44 PM   #15
tonj
Member
 
Registered: Sep 2008
Posts: 546

Original Poster
Rep: Reputation: 37
yes in /var/log/samba/log.<ip-machine-A> there were lots of lines like this:
Quote:
[2015/03/16 15:42:00, 0] smbd/sesssetup.c:reply_sesssetup_and_X(1263)
reply_sesssetup_and_X: Rejecting attempt at SPNEGO session setup when it was not negoitiated.
which makes me suspicious that machine-B is not giving the password, or not completing it's side of the negotiating process.

Last edited by tonj; 03-18-2015 at 03:46 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mount error (13). Permission denied Esaraujo Linux - Newbie 3 06-05-2013 07:47 AM
Mount error 13:permission denied while trying to mount Buffalo NAS to RHEL grendle65 Linux - Newbie 4 05-06-2013 05:39 PM
mount cifs error 13 (permission denied) but... realized Linux - Networking 2 10-25-2012 06:00 PM
manual mount cifs works but srcipt mount cifs has mount error (13): Permission denied CADIT Linux - Newbie 6 11-20-2009 02:48 PM
Permission denied error when trying to mount image contained in sshfs mount openSauce Linux - General 2 03-08-2009 08:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration