Linux - SoftwareThis 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.
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.
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?
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.
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.
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.
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)?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.