[Solved] Samba Haiku shares

Hi, I’m new to Haiku and trying to replicate my usual “linux” workflow which consists on ssh remote and samba shares access to a virtual machine

I’ve got no problem booting Haiku on VirtualBox, and enable sshd but I struggle a lot with samba

I’ve managed to get samba up and running, I can browse the shares from my MacOS computer but after a while (a matter of minutes) my ssh sessions freeze and Haiku UI become unstable, the desktop is erased in blue and moving the mouse repaints the icons and launch tools.

I’ve not found a solution to launch nmbd and smbd as services so I launch them from the command line as daemons.

I suspect a problem in the samba haiku port itself but would like to know if some of you have found a way to get samba running and being stable…

What network card do you use in VirtualBox? PCnet is known to cause problems on Haiku, try switching to Intel Pro/1000.

Right, samba port hasn’t been updated to use Haiku’s launch_daemon yet.
It should provide /system/data/user_launch/samba launch file.

Here are some examples on how to do that in the .recipe.
https://github.com/haikuports/haikuports/search?q=user_launch

1 Like

Thanks ! Changing the network card did the job. I left Haiku running for 2 hours, while browsing the samba share from time to time, and everything is fine !

2 Likes

Lucky you! I have never seen samba working yet :wink:

And now samba even runs at boot time ! I’m blessed :slight_smile:

[as I’m lazy, I only used /boot/home/config/settings/boot/UserBootscript]

Is there a guide to help setting up a samba server on haiku?

It’s pretty straighforward,

  • use pkgman to install the samba package
  • edit /system/settings/samba/smb.conf

[global]
workgroup = SAMBA
security = user
debug level = 5
guest account = user
allow insecure wide links = yes
unix extensions = no

[haiku]
path = /
public = yes
read only = no
follow symlinks = yes
wide links = yes

Then from the command line
smbpasswd -a user
type your password twice

Then add these two lines to /boot/home/config/settings/boot/UserBootscript
/bin/nmbd --daemon
/bin/smbd --daemon

Restart haiku

The server will appear as “shredder”

Note : I don’t have my Haiku VM machine running, it’s from memory, check the docs

4 Likes

That doesn’t seem to work, and there are no docs included with the samba package. :frowning:

The full doc is here
https://www.samba.org/samba/docs/man/

You might have troubles if you’re browsing from Windows. Windows access to samba shares have always been a PITA for me. MacOS is really forgiving for that matter, I never had a single problem browsing any kind of quick&dirty samba setups

1 Like

It doesn’t work from Windows, but now I can share filed between 32bit and 64bit Haiku installs!

1 Like

This now works for me - many thanks. I installed fuseSMB from HaikoDepot and made the alterations to the config file as per instructions but I found that the nmbd was not running. If I started it manually then the HAIKU-D630 machine (this one) would show in Windows 7 and was fully accessible. I then added the /bin/nmbd line after the /bin/smbd in the UserBootscript file and it now works on boot up.

I don’t know where the Windows machine is supposed to show up in Haiku but it does not really matter that much to me as at least I can transfer files from Windows to Haiku even though I do it from the Windows machine.

The cgimenez instructions could either be incorporated into the FuseSMD instalation or made readily available.

Thanks for the help - invaluable.

So far it works on Windows 7 but not on Windows 10. Will leave it for the moment and do other things with my life but this is good result for me.

SMBv1 is disabled in default on W10, and on Haiku we have no support for more recent SMB versions (yet).

2 Likes