Samba4 on Pfsense 2.4
-
I am trying to setup a small box with a smb share and can't successfully get it running. I have an x64 amd box with pfsense 2.4 running fine and the following are the commands I am using to install and configure samba. I've tried both recent samba45-4.5.8 and samba46-4.6.2. What am I missing?
Silvio Giunge Silva a.k.a kanazuchi posted a few years ago in the samba mailing list having experienced the same errors on an older version of pfsense but that thread was never updated with any resolution except the author thought maybe the problem was with NIS or missing pkg.
pkg add http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/gamin-0.1.10_9.txz pkg add http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/libtasn1-4.10.txz pkg add http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/libunistring-0.9.7.txz pkg add http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/p11-kit-0.23.5.txz pkg add http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/tpm-emulator-0.7.4_1.txz pkg add http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/trousers-0.3.14_1.txz pkg add http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/gnutls-3.5.9.txz pkg add http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/popt-1.16_2.txz pkg add http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/python2-2_3.txz pkg add http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/talloc-2.1.9.txz pkg add http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/tdb-1.3.12,1.txz pkg add http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/tevent-0.9.31.txz pkg add http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/ldb-1.1.29_1.txz pkg add http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/libarchive-3.3.1,1.txz pkg add http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/libinotify-20160505.txz pkg add http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/libsunacl-1.0.txz pkg add http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/py27-setuptools-32.1.0_1.txz pkg add http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/py27-dnspython-1.15.0.txz pkg add http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/py27-iso8601-0.1.11.txz pkg add http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/samba46-4.6.2.txz
Create /etc/rc.conf with:
samba_server_enable="YES"
create new file
/usr/local/etc/smb4.conf[global] netbios name = Server server string = pfSense workgroup = WORKGROUP os level = 39 security = share preferred master = yes usershare allow guests = yes guest account = root socket options = TCP_NODELAY [Public] comment = Huh? writeable = yes public = yes path = /home/public browseable = yes guest ok = yes
starting samba
/usr/local/etc/rc.d/samba_server start
returns:
Performing sanity check on Samba configuration: FAILEDthere are no files and nothing is logged in:
/var/log/samba4testparm ```returns: /usr/local/lib/samba4/libsmbconf.so.0: Undefined symbol "yp_match"
/usr/local/bin/samba-tool
returns: ERROR(<type 'exceptions.importerror'="">): uncaught exception - /usr/local/lib/samba4/libsmbconf.so.0: Undefined symbol "yp_match" File "/usr/local/bin/samba-tool", line 44, in <module>retval = cmd._run("samba-tool", subcommand, *args) File "/usr/local/lib/python2.7/site-packages/samba/netcmd/__init__.py", line 210, in _run cmd = self.subcommands[cmd_name] File "/usr/local/lib/python2.7/site-packages/samba/netcmd/main.py", line 35, in __getitem__ fromlist=['cmd_%s' % attr]), File "/usr/local/lib/python2.7/site-packages/samba/netcmd/delegation.py", line 23, in <module>from samba import provision File "/usr/local/lib/python2.7/site-packages/samba/provision/__init__.py", line 47, in <module>from samba.samba3 import smbd, passdb File "/usr/local/lib/python2.7/site-packages/samba/samba3/__init__.py", line 29, in <module>import passdb</module></module></module></module></type>
-
Try samba4 from: https://pkg.mundounix.com.br/pfsense/
I've got it running
There was a website with additional info: https://pf2ad.mundounix.com.br/
But seems offline now :( -
Which version pfsense do you have it running on? Do you remember if you had to do anything special? Thanks
-
samba-tool don't work on pfSense cause the Yellow Pages is disable in the build of his image.
To work properly this must be enable because samba-tool look for the YP simbols and don't find them. -
I used to the pf2ad.sh script found on this website: https://pf2ad.mundounix.com.br/en/index.html
Its a customized Samba4.4 package which works under pFsense
Currently I use 2.3.3. But before I tested it on 2.4. Did work as well.
-
This is a firewall. Do not install packages or run scripts from other sources on it. That is a giant security nightmare. You have no way to verify that those packages are secure or properly built from trustworthy sources.