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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
03-12-2015, 05:16 PM
|
#1
|
Member
Registered: Sep 2008
Posts: 556
Rep:
|
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?
|
|
|
03-12-2015, 09:21 PM
|
#2
|
Senior Member
Registered: Aug 2009
Posts: 3,790
|
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?
|
|
|
03-13-2015, 05:17 AM
|
#3
|
Member
Registered: Sep 2008
Posts: 556
Original Poster
Rep:
|
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.
|
|
|
03-13-2015, 11:10 PM
|
#4
|
Senior Member
Registered: Aug 2009
Posts: 3,790
|
If you leave 'password=...' out of the arguments you should get prompted for it, could you give that a try?
|
|
|
03-14-2015, 04:14 AM
|
#5
|
Member
Registered: Sep 2008
Posts: 556
Original Poster
Rep:
|
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.
|
|
|
03-14-2015, 04:55 PM
|
#6
|
Senior Member
Registered: Aug 2009
Posts: 3,790
|
There's nothing mounted on /media/machine-B already is there?
|
|
|
03-14-2015, 05:06 PM
|
#7
|
Member
Registered: Sep 2008
Posts: 556
Original Poster
Rep:
|
no, this is the only mount being tried on machine-B from machine-A
|
|
|
03-14-2015, 06:01 PM
|
#8
|
Senior Member
Registered: Aug 2009
Posts: 3,790
|
Can you try adding 'sec=ntlmssp' to the mount options?
|
|
|
03-15-2015, 04:36 AM
|
#9
|
Member
Registered: Sep 2008
Posts: 556
Original Poster
Rep:
|
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
|
|
|
|
03-15-2015, 05:09 AM
|
#10
|
Senior Member
Registered: Aug 2009
Posts: 3,790
|
If you try a mount with verbose ('-v') it may give some more detail
Also have you tried specifying the domain?
|
|
|
03-15-2015, 04:33 PM
|
#11
|
Member
Registered: Sep 2008
Posts: 556
Original Poster
Rep:
|
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?
|
|
|
03-15-2015, 05:00 PM
|
#13
|
Member
Registered: Sep 2008
Posts: 556
Original Poster
Rep:
|
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.
|
|
|
03-15-2015, 05:48 PM
|
#14
|
Senior Member
Registered: Aug 2009
Posts: 3,790
|
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.
|
|
|
03-18-2015, 03:44 PM
|
#15
|
Member
Registered: Sep 2008
Posts: 556
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 07:21 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|