View the Most Wanted LQ Wiki articles.
LinuxQuestions.org > Linux Wiki > Smbclient

From LQWiki

Jump to: navigation, search

smbclient is an Open Source networking application that allows non-Microsoft systems to participate in Microsoft Networking as a client. smbclient is usually packaged as part of the samba suite and ships with most linux distributions.

How can this help me

You can see what samba shares are on your computer like that:

$ smbclient -L localhost
Password:
Domain=[KOLOSSUS] OS=[Unix] Server=[Samba 3.0.23d-19.2-1179-SUSE-SL10.2]

        Sharename       Type      Comment
        ---------       ----      -------
        profiles        Disk      Network Profiles Service
        users           Disk      All users
        groups          Disk      All groups
        print$          Disk      Printer Drivers
        IPC$            IPC       IPC Service (Samba 3.0.23d-19.2-1179-SUSE-SL10.2)
        officejet6100series Printer   Hewlett-Packard OfficeJet 6100 Series
Domain=[KOLOSSUS] OS=[Unix] Server=[Samba 3.0.23d-19.2-1179-SUSE-SL10.2]

        Server               Comment
        ---------            -------

        Workgroup            Master
        ---------            -------

History

The various incarnations of Microsoft Windows Networking (CIFS, NetBEUI, etc.) have had a wide variety of bugs and idiosyncracies. Many of these have never actually been fixed, and some are still supported in "compatibility modes" by Microsoft today.

When Andrew Tridgell was developing samba he found it inconvenient to have to maintain a farm of windows machines running all the various Microsoft OSes for testing purposes. In order to allow faster, more accurate testing, he wrote a program called smbclient that purposely implemented every bug and poorly thought out "feature" that any version of Windows had ever had. Later, for capacity and load testing, Tridge further modified the code to be as network-inefficient as possible. In short, the program was purposely designed to be the worst possible client that could still connect to a Windows file share.

Because the makefiles and CVS configuration of the samba suite were designed to bundle all the programs in the development space into the samba distribution, the smbclient program was inadvertently distributed to end-users without any documentation or explanation. Several users discovered this program, and Tridge was eventually horrified to learn that a large bank had built their payroll system around the use of smbclient.

In order to make the best of the existing situation, smbclient was rewritten to provide some measure of reliability, and the original smbclient was renamed smbtorture]]. Both are still in use by the Samba Team.


Share

Personal tools