Monday, August 13, 2007

Homecase: smbclient vs cifs perma-mount 1 - 0

Smbclient and generally smb-browsers (either command-line or gui ones) are better for non-carrier-grade networks like home-LANs.

retrieved from: http://learn.clemsonlinux.org/wiki/Samba_client

If you just need to grab a file, or put a file on the server, but don't need a constant connection, it is best to either browse to the share using Gnome/KDE's built in Samba browser, or to use the command line client smbclient. This assumes you have the samba-client package installed provided by your distribution.

Using smbclient is very similar to using a command-line FTP client. Here are a few useful commands:

$ smbclient -L //hostname

Where hostname is the NetBIOS name of the machine you wish to connect to. After being prompted for a password (enter no password for anonymous login) this command will give you a list of available shares on the machine, plus some other information.

To connect to a share, you must specify the share name, in the format //hostname/sharename where sharename could be the name of a file share, or a printer, or anything else Samba can handle.

$ smbclient //joescomp/joe

After entering joe's password, you are given an smb: \> prompt where you may enter commands much like an FTP client. Some commands include ls, get, put, rm, help and quit. The help command will list all the commands, and help command will give help on a certain command.




No comments: