Today I'm putting up a quick reference on mounting SMB shares on a unix-based system. There are two main methods used for this. You can use the smbmount utilities, or the smbfs file system type.

The easiest way to mount a share remains with the smbmount utility. Most *nix systems come with this utility installed by default. The syntax is fairly simple: call the utility, specify the share, specify where to mount it, and list any options you might want to use.

Just remember not to include a trailing slash when specifying your share folder. For some reason, smbmount can not handle this.

Here's a quick example from my Debian Lenny system. In this case, I am trying to connect to a folder called share on a remote machine called pandorum using the username neptune and the password trident:

smbmount //pandorum/share /mnt/share -o username=neptune,password=trident,rw

That's it! The only tricky part may be connecting to a machine that is a member of an Active Directory network. Sometimes in this situation, you will receive an error stating session setup failed. In this case, you simply need to specify the username as "username/domain". It is important to recognize that the username comes first and the domain second, and that it MUST use a forward slash (you cannot specify @).

On a final note, there is an alternate syntax that can be used interchangeably:

mount -t smbfs -o username=neptune,password=trident //pandorum/share /mnt/share

There really isn't any difference from a functional standpoint on how this works, although technically when you specify mount -t smbfs it really calls smbmount in the background.

Well, that's about it. It's not completely comprehensive, but this should be enough to get you going! Check your local man pages for more info...
;)