*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
whereis smbd.
Check /usr/local/bin
Non-FreeBSD system stuff is in /usr/local
Nooooooooooooooooo, you do not ./configure, you use the ports system so you can use the ports upgrade process.
cd to the samba folder you want to install.
# make
You will be presented with a menu selection. Be sure to uncheck LDAP unless you are using it on your system.
# make install clean
Samba 3.0.6 has a different password method and you will have trouble with the older smbpasswd.
Note: You should really read the Handbook before you screw up the ports system by adding apps outside the ports that cannot be upgraded easily.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
There's already a port of Samba, like -X- said. The whole point of the BSDs with the ports system is that you should almost never need to download source and go through to compilation steps.
$ man ports
That being said, if you install from ports it should be in /usr/libexec (it's *libexec* something) in OpenBSD.
and remember to review some previous threads about updating your ports tree. Once you get the hang of updating the ports tree and using it properly, you will see how easy and efficient it is.
I need 3.0.x coz I need NT Domain server. I was frustrated trying this 2.2.7a with RH9, it can't add my XP hosts to the passwd on the fly and can't even make NT Domain works, only good for file sharing.
When I tried Slackware 10 with 3.0.4 of Samba, the same procedure I made with RH9 and Samba 2.2.7, it worked flawlessly, without too much effort.
I switch to 3.0.x coz the Samba 2.2.x README regarding its direction, version 3 will have the full support for NT Domain.
I have done whereis actually before posting this, it can't find smbd. Either in /usr/local/sbin, which also a possible location, smbd is missing. But smb.conf is present in /etc/samba/.
Samba 3.0.6 is ok, it just uses a different password database. I'm not at my FreeBSD box now, so I'm unable to give any more info. If you have problems, just google it, or read the change log.
You shouldn't need to know where smbd is, just start samba in /usr/local/etc/rc.d/ and the script will do all the work for you.
None of my Linux and Slackware was that way. There is a Slackware / rc.samba script that starts smbd and nmbd. The smbd is in /usr/bin not .../rc.d. I don't think any Linux distro put smbd in .../rc.d. .../rc.d just has scripts.
For FreeBSD, put this in /etc/rc.config.
samba_enable="YES"
That will start samba on boot.
I'm not at my FreeBSD box, going by memory....
To start samba w/o rebooting;
/usr/local/etc/rc.d/samba.sh start
or something like that. If you make changes to smb.conf, you will need to restart the samba.sh script.
That will start the smbd and nmbd deamon. Find the script and read it. Its all setup for you.
I found it thru find utility. It's in /usr/local/libexec, both the smbd and nmbd daemons. I just created a symlink within /usr/sbin for both and it's now working.
How can I mount remote smb shares, it seems that smbmount is not applicable on BSD.
I saw an rc.local in /etc so I added these lines after the last entry:
# Samba startup
if [ -x /usr/sbin/smbd -a /usr/sbin/nmbd -a -s /etc/samba/smb.conf ]; then
echo "Running Samba..."; /usr/sbin/smbd -D; /usr/sbin/nmbd -D
if [ `cat /var/run/smbd.pid` != 0 ]; then
echo "Samba is running..."
fi
fi
Not sure why you created all that in /etc/rc.local since the samba port sets it up for you. If you installed the samba port correctly, you just needed to do as I said. If you did not install from ports, you may have problems later when you do a portupgrade. But, hey, if you're happy, that's what matters.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.