can't mount windows smb share

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Post Reply
Gorf
Posts: 7
Joined: 2008/11/27 03:46:16
Contact:

can't mount windows smb share

Post by Gorf » 2008/11/27 03:56:22

from my CentOS 5 box I am attempting to connect to a Windows smb share to move some data around. So I am trying to use this command:

sudo mount -t cifs -o username=accountname,password=password //bkupserver/e\$ /tmp/logs

which fails with this error:

mount: wrong fs type, bad option, bad superblock on //bkupserver/e$,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

So I tail my logs, which produce this output:

Nov 26 19:21:40 qatest-srv kernel: CIFS VFS: cifs_mount failed w/return code = -22
Nov 26 19:24:29 qatest-srv kernel:last message repeated 2 times
Nov 26 19:50:02 qatest-srv kernel: CIFS VFS: cifs_mount failed w/return code = -22

I viewed the documentation that I found here:

http://wiki.centos.org/TipsAndTricks/WindowsShares

However none of that works, as I am not going to write a script to edit my fstab, mount a volume, copy content, then unmount, then unedit my fstab file for 85 servers. That's ridiculous. So that documentation doesn't help.

What am I missing here. I noted with quite some disappointment that smbmount is now deprecated and no longer in the yum repositories. Thankfully my Ubuntu machines still have it in their repository so they can all connect to the share perfectly.

Thoughts?

-G

Gorf
Posts: 7
Joined: 2008/11/27 03:46:16
Contact:

Re: can't mount windows smb share

Post by Gorf » 2008/11/27 04:20:46

SHAZAM!

Ok this took a little work, but I discovered the problem. While I installed "samba" which installs the samba.x86_64 package and the samba-common.x86_64 what appears to be missing is the samba-client tools.

sudo yum install samba-client

and now you can see that I have the proper smaba tools:

$ sudo yum list installed | grep -i samba
samba.x86_64 3.0.28-1.el5_2.1 installed
samba-client.x86_64 3.0.28-1.el5_2.1 installed
samba-common.x86_64 3.0.28-1.el5_2.1 installed

And now my mount command completes fine. what is interesting is that when I do "sudo yum provides mount.cifs" it doesn't provide me anything. That seems like an error to me. I suppose I should got involved with the Wiki documentation program and provide some of this myself. :-D

NedSlider
Forum Moderator
Posts: 2897
Joined: 2005/10/28 13:11:50
Location: UK

can't mount windows smb share

Post by NedSlider » 2008/11/27 10:31:48

Glad you figured it out :-)

[quote]
Gorf wrote:

And now my mount command completes fine. what is interesting is that when I do "sudo yum provides mount.cifs" it doesn't provide me anything. That seems like an error to me. I suppose I should got involved with the Wiki documentation program and provide some of this myself. :-D[/quote]

You need to specify the full path or use a wild card with yum provides:

[code]yum provides /sbin/mount.cifs
yum provides *mount.cifs
[/code]

will both work :-)

Post Reply