[Samba] Pruning embedded samba 3.6 installation

Volker Lendecke Volker.Lendecke at SerNet.DE
Thu Apr 11 04:31:02 MDT 2013


Start with only smbd and depending on your configuration the
VFS modules. Depending on whether you need NetBIOS, you
might also need nmbd. Please try to avoid security=share if
at all possible. If you have just a fixed password, you can
prepare a smbpasswd file externally, so that you can also
ditch the smbpasswd binary.

Hope that helps,

Volker

On Wed, Apr 10, 2013 at 10:18:01PM -0700, Paul D. DeRocco wrote:
> I'm using the Yocto Project to build an embedded distro, to which I'm adding
> Samba 3.6 from OpenEmbedded. Doing so increases my root file system from
> about 63MB to 175MB. I seem to be building a large Samba server with a small
> ancillary operating system tacked onto it.
> 
> I listed the files in my file system image, and see that lots of the
> commands are quite large. I understand that Samba 4 is better behaved in
> this way, but writing my own bitbake recipe to include such a large complex
> system is waaay beyond me, so I have to wait until someone else does it. I
> can, however, figure out how to prune various unneeded files from the image
> to make it smaller.
> 
> But what's unneeded? I'd like to know what commands will NEVER be used if I
> don't explicitly invoke them myself. That is, commands that aren't invoked
> from init scripts, or by smbd and nmbd, or by other commands. (And what
> shared libraries won't be used, although they're typically a lot smaller.)
> I'm running a simple standalone server with a single file share using share
> level security, and one password for anonymous access. It assumes a remote
> DHCP server, and needs to appear on Windows systems under a particular name,
> and be browsable. I don't need a client, it won't be part of a domain, it
> won't be a WINS server, and so on. Its configuration will never change,
> other than possibly the machine name, the workgroup name, and the single
> password used to access the share.
> 
> These are most of the files, and their sizes. I'm not sure all of these are
> really part of Samba, but they all got added as a result of adding the OE
> Samba package. They add up to about 83MB, and if I could cut that in half,
> that would be a big win. Any guidance as to what I could prune would be
> greatly appreciated.
> 
> 1800096 usr/bin/eventlogadm
>    4607 usr/bin/findsmb
> 8351180 usr/bin/net
> 1526820 usr/bin/nmblookup
> 1826880 usr/bin/pdbedit
> 1465348 usr/bin/profiles
> 7457348 usr/bin/rpcclient
> 1440772 usr/bin/sharesec
> 5946532 usr/bin/smbcacls
> 5979364 usr/bin/smbclient
> 1465604 usr/bin/smbcontrol
> 5942436 usr/bin/smbcquotas
> 6200476 usr/bin/smbget
> 5966980 usr/bin/smbpasswd
> 3284036 usr/bin/smbspool
> 1514500 usr/bin/smbstatus
>    4910 usr/bin/smbtar
> 1440736 usr/bin/smbta-util
> 5872800 usr/bin/smbtree
>   30216 usr/bin/tdbbackup
>   26064 usr/bin/tdbdump
>   30180 usr/bin/tdbrestore
>   34600 usr/bin/tdbtool
> 1444868 usr/bin/testparm
>  166092 usr/bin/udevadm
>    1024 usr/lib/auth
>    9476 usr/lib/auth/script.so
>    1024 usr/lib/charset
>    5356 usr/lib/charset/CP437.so
>    5356 usr/lib/charset/CP850.so
>      15 usr/lib/libtdb.so.1
>   87516 usr/lib/libtdb.so.1.2.9
>   62908 usr/lib/libwbclient.so.0
>  131072 usr/lib/lowcase.dat
>  131072 usr/lib/upcase.dat
>   65536 usr/lib/valid.dat
>    1024 usr/lib/vfs
>   30704 usr/lib/vfs/acl_tdb.so
>   26612 usr/lib/vfs/acl_xattr.so
>   18256 usr/lib/vfs/aio_fork.so
>   10052 usr/lib/vfs/audit.so
>   18316 usr/lib/vfs/cap.so
>   18320 usr/lib/vfs/catia.so
>    5908 usr/lib/vfs/crossrename.so
>    5848 usr/lib/vfs/default_quota.so
>   10000 usr/lib/vfs/dirsort.so
>   10004 usr/lib/vfs/expand_msdfs.so
>   14184 usr/lib/vfs/extd_audit.so
>    5844 usr/lib/vfs/fake_perms.so
>   47432 usr/lib/vfs/full_audit.so
>    9976 usr/lib/vfs/linux_xfs_sgid.so
>   14160 usr/lib/vfs/netatalk.so
>   10064 usr/lib/vfs/preopen.so
>    9972 usr/lib/vfs/readahead.so
>   18244 usr/lib/vfs/readonly.so
>   22384 usr/lib/vfs/recycle.so
>   26516 usr/lib/vfs/scannedonly.so
>   30676 usr/lib/vfs/shadow_copy2.so
>   10004 usr/lib/vfs/shadow_copy.so
>   22460 usr/lib/vfs/smb_traffic_analyzer.so
>   18296 usr/lib/vfs/streams_depot.so
>   22424 usr/lib/vfs/streams_xattr.so
>   10032 usr/lib/vfs/syncops.so
>   43188 usr/lib/vfs/time_audit.so
>   22388 usr/lib/vfs/xattr_tdb.so
>    7288 usr/sbin/genl-ctrl-list
>   10668 usr/sbin/nl-class-add
>    9428 usr/sbin/nl-class-delete
>    7376 usr/sbin/nl-classid-lookup
>    8824 usr/sbin/nl-class-list
>   10596 usr/sbin/nl-cls-add
>    9920 usr/sbin/nl-cls-delete
>    9516 usr/sbin/nl-cls-list
>    8760 usr/sbin/nl-link-list
>    8628 usr/sbin/nl-pktloc-lookup
>    9972 usr/sbin/nl-qdisc-add
>    9572 usr/sbin/nl-qdisc-delete
>   10028 usr/sbin/nl-qdisc-list
> 3488896 usr/sbin/nmbd
> 9822288 usr/sbin/smbd
> 
> -- 
> 
> Ciao,               Paul D. DeRocco
> Paul                mailto:pderocco at ix.netcom.com 
>  
> 
> -- 
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de


More information about the samba mailing list