[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.

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

2 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

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

1 Like