SMBindex is a file search engine for local Windows network. It consists of two main modules:

  1. Indexing Perl script It has to be run at regular intervals by crond (e.g. once an hour). It searches for computers with free access files. Several computers can be indexed simultaneously. Their number should be set during installation and is saved in a config file. The index information is entered in a MySQL table and includes the file location, name, size and date when it was created. This data table could be used by:
  2. Frontend search PHP script smbindex.php. It is located in the Apache DocumentRoot directory. It represents an user search interface. It could be searched by categories (e.g. audio, video, pictures, etc.); the results can be sorted by file name, location, size and date; it can define the maximum or minimum size of the searched files. It shows the links to the computers sorting them by the total size of the shared files. Furthermore, it gives the following statistics: number of computers, number of files, total size of the files, age of database.


GNU General Public License, version 2


  1. UNIX-like operating system (e.g. Linux).
  2. Samba 3.x.xx file server. Not necessarily operating. It is not yet tested on Samba 2, but I suppose it will work.
  3. Apache 1.3.xx or 2.x.xx web server with PHP 4.x.x or 5.x.x module.
  4. MySQL 4.x.xx database server.
  5. Perl 5.x.x.
  6. Bash 2.x.x or 3.xx.
  7. Nmap 3.xx if you want to use Nmap scan method.
  8. NBTscan 1.x.x if you want to use NBTscan method.


  1. Login as root.
  2. Create MySQL account for SMBindex.
  3. Unpack the package.
  4. Start the script and answer correctly to the questions. Please, read carefully the final notes.
  5. Start the script to see if everithing is OK.
  6. Crond should be programmed to start at regular intervals. If you are not acquainted with the proceedings please see man crontab.

    If you have /etc/ directories, you can make a symlink in one of them (for example: cron.hourly) linked to That's all you have to do. For example:

    ln -s /usr/local/smbindex/ /etc/cron.hourly/smbindex.cron
  7. If you want better security please change the permissions of /etc/smbindex directory and containing files. Their owner should be the same as the one that is used by the Apache web server. For example:

    chown -R nobody:nobody /etc/smbindex
    chmod 600 /etc/smbindex/*
    chmod 700 /etc/smbindex
  8. If later on you'd like to change some of the settings, you can edit /etc/smbindex/config file.

Additional Info

The indexing script isn't designed to work under Windows.

The frontend works correctly with Internet Explorer, Konqueror and Epiphany. Probably it will work with other browsers that supports the Samba protocol. Unfortunately Opera, Mozilla and Mozilla Firefox don't support that. By the way, I compiled Mozilla and Mozilla Firefox with Samba support on Gentoo Linux, and SMBindex works perfect with them. But in other OS-es these browsers comes in precompiled binary packages that probably don't supports Samba.

The SMBindex has multi-language system. It could be done by use of the web/lang directory files. I would be glad if with your help I could add the support of more languages. You don't have to be a programmer in order to do a translation. All you have to do is to edit the already existing file in another language and send it to me.

Get SMBindex

SourceForge project Releases