Section 15.2. Samba System File Location


15.2. Samba System File Location

One of the frustrations expressed by subscribers to the Samba mailing lists revolves around the choice of where the default Samba Team build and installation process locates its Samba files. The location, chosen in the early 1990s, for the default installation is in the /usr/local/samba directory. This is a perfectly reasonable location, particularly given all the other Open Source software that installs into the /usr/local subdirectories.

Several UNIX vendors, and Linux vendors in particular, elected to locate the Samba files in a location other than the Samba Team default.

Linux vendors, working in conjunction with the Free Standards Group (FSG), Linux Standards Base (LSB), and File Hierarchy System (FHS), have elected to locate the configuration files under the /etc/samba directory, common binary files (those used by users) in the /usr/ bin directory, and the administrative files (daemons) in the /usr/sbin directory. Support files for the Samba Web Admin Tool (SWAT) are located under the /usr/share directory, either in /usr/share/samba/swat or in /usr/share/swat. There are additional support files for smbd in the /usr/lib/samba directory tree. The files located there include the dynamically loadable modules for the passdb backend as well as for the VFS modules.

Samba creates runtime control files and generates log files. The runtime control files (tdb and dat files) are stored in the /var/lib/samba directory. Log files are created in /var/log/samba.

When Samba is built and installed using the default Samba Team process, all files are located under the /usr/local/samba directory tree. This makes it simple to find the files that Samba owns.

One way to find the Samba files that are installed on your UNIX/Linux system is to search for the location of all files called smbd. Here is an example:

root#   find / -name smbd -print 

You can find the location of the configuration files by running:

root#   /path-to-binary-file/smbd -b | more ... Paths:    SBINDIR: /usr/sbin    BINDIR: /usr/bin    SWATDIR: /usr/share/samba/swat    CONFIGFILE: /etc/samba/smb.conf    LOGFILEBASE: /var/log/samba    LMHOSTSFILE: /etc/samba/lmhosts    LIBDIR: /usr/lib/samba    SHLIBEXT: so    LOCKDIR: /var/lib/samba    PIDDIR: /var/run/samba    SMB_PASSWD_FILE: /etc/samba/smbpasswd    PRIVATE_DIR: /etc/samba ... 

If you wish to locate the Samba version, just run:

root#   /path-to-binary-file/smbd -V Version 3.0.20-SUSE 

Many people have been caught by installation of Samba using the default Samba Team process when it was already installed by the platform vendor's method. If your platform uses RPM format packages, you can check to see if Samba is installed by executing:

root#   rpm -qa | grep samba samba3-pdb-3.0.20-1 samba3-vscan-0.3.6-0 samba3-winbind-3.0.20-1 samba3-3.0.20-1 samba3-python-3.0.20-1 samba3-utils-3.0.20-1 samba3-doc-3.0.20-1 samba3-client-3.0.20-1 samba3-cifsmount-3.0.20-1 

The package names, of course, vary according to how the vendor, or the binary package builder, prepared them.



    Samba-3 by Example. Practical Exercises to Successful Deployment
    Samba-3 by Example: Practical Exercises to Successful Deployment (2nd Edition)
    ISBN: 013188221X
    EAN: 2147483647
    Year: 2005
    Pages: 142

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net