I've found that the following syntax works perfect for mounting samba shares:
Quote:
|
mount -t cifs -o user=<user-name> //<server-name>/<root-share-name> <mount-point>
|
Here are some very important points about how the mount utility works (or not works) when it comes to mounting samba shares:
1. For the -t parameter smbfs *won't* work. That value for the -t parameter has retired and no longer supported.
2. If you specify a user whose password is *blank*, you'll need to just press enter when prompted for password. In this case, mount will fail with a permission denied error. So always specify a user who does have a password.
3. <share-name> *must* be the root of a share not a subdirectory of it. For example, if you have a server named myserver with the following shared directory structure,
RootShare
|
---SubDirOne
---SubDirTwo
|
---SubSubDirOne
then you can mount nothig but the directory RootShare. Trying to mount any of the sub-directories will result in the following error:
Quote:
retrying with upper case share name
mount error 6 = No such device or address
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
|
4. The <mount-point> should be an already existing directory.
I hope this makes up for a crystal clear solution to a *very* common problem. Try googling for it and you'll see it seems like everyone on this planet has gone through this problem
Note: I've also posted this same solution on my blog
Sooper Tux.