This is the archived site of libsmb++. The project is dead by now, and this page is here only for the curious. You can find the final version of libsmb++ here.


Libsmb++ is a C++ library that enables Unix programs to access Windows SMB shares. It does so by implementing methods which act the same as the standard Unix I/O functions (open, write, readdir...) but on SMB URLs instead. The network is completely transparent to the programmer, that is, you can consider workgroups, hosts, shares and real paths as directories and files and use them as such. For example, "smb:/foogroup" is a directory containing the names of the group members and can be opened with opendir("smb:/foogroup").

It is a SMB client, which means it can connect to servers and download/upload files. It is not a server, and therefore cannot add shares and user accounts on the local host. If you're looking for a SMB server, try Samba.

It's the continuation of the 'libsmb' project, hence the 0.9 version. It has just been renamed to avoid a clash with Samba 3.0 (a.k.a. the next generation, samba-tng) which will have most of its code in shared libraries. And also because it's C++.

The great feature of all this is that Libsmb++ can use Samba-tng code if it's found on the system, or fallback on its own native code otherwise. Thus it provides a high-level API for Samba, and can still offer limited SMB support when Samba isn't installed.


You can download the source package here.

This project has been moved to Sourceforge, but we owe a great thanks to the PLD project for having hosted libsmb for one year on their CVS server. Visit their site!
Changes between version 0.9.0 and 0.9.1 are the necessary updates for linking correctly to Samba-tng-1.8 and the choice of smb:/ instead of smb://


Just a few questions/answers. Read the README file in the package for more information.

Is it related to Samba?
Yes, but also no. The library has been written independantly from Samba, and the native code can run without Samba present on the system. However, it is strongly recommended to install Samba-TNG and compile this library to use it, as you'll have much better results.

Native Code:
Nothing's perfect, and certainly not this library. First of all, the SMB protocol itself isn't perfect. Usually, this library works fine for LANs. However, as soon as the SMB network spans several subnets, problems appear (even in the presence of a WINS server, supported and necessary in this case). It is not possible to do domain logons though it is possible to log on a each server that requires it. Encryption is implemented for the protocol versions we use (according to the specifications...), some servers still refuse access or send unknown packets. There are also bugs, inevitably.
Samba mode:
It can more or less do what smbclient does. Anything related to SMB in Samba mode is done in the Samba libraries, so refer to Samba in that case. The library cannot do domain logons.

Is there a mailing-list?
Information concerning the mailing list is available here. The old mailing list is no longer active.

A cvs server?
Check the web interface. If you want to participate, get a user account on SourceForge and ask us for a cvs access.

When will 1.0 be released?
When we have time! And anyway not before Samba-3.0 is out.

How can I report a bug?
You can report a missing feature or a bug by sending a mail to the mailing list describing your problem. If possible, try to use the CVS version first to see if it's not there already. Also be sure that the bug really comes from the library itself, not from Samba. For information, unless someone with more time and motivation than me does it, the native code is no longer supported (see personal note below).

Personal Note (Well, I know, it's not a FAQ...)
I'm no longer on an LAN and don't use SMB anymore. The protocol changes constantly, and I certainly cannot/will not maintain the native code. Moreover, I'm bored of doing SMB and would like to move on to more interesting projects. Don't worry though, I'll try to maintain the link with Samba as their API is now stable and it's quite fun to do a project like this, and hopefully more people will come to help.

Library Documentation

This is the documentation released with the 0.9 version. It is also provided in the source packages.
Unless we discover a really missing feature or serious bug, you may consider the API stable.

Libsmb++ home page, 2000-04-08
Nicolas Brodu