[Samba] configuring samba for virtualbox guest os host only network

mathias dufresne infractory at gmail.com
Mon Aug 28 08:14:45 UTC 2017


Hi,

I would stop forcing Samba to listen on non-existing interface. Doing that
it should listen on every existing interface and if you are lucky, it
should listen on VirtualBox generated interface when it becomes available.

Another way to achieve that, this time keeping "interfaces = vboxnet0" in
smb.conf, would be to start VirtualBox at startup, doing that the interface
should become available at start up, then you just have to manage that
Samba starts after VirtualBox.

Please come back to tell us how things went.

2017-08-26 13:26 GMT+02:00 Istvan Gabor via samba <samba at lists.samba.org>:

> Dear samba users:
>
> I am new on this list and know samba at a very basic level.
> I use openSUSE 42.2 Leap with its default samba 4.4.2 version.
>
> This is what I would like to achieve:
>
> I have a guest windows OS in virtualbox 5.1. Occasionally
> I have to print documents from this guest OS using my printer
> configured in openSUSE. I would like to use samba to share my
> printer between the linux host and the guest OS. Virtualbox
> uses a network host-only network adapter called vboxnet0.
> Unfortunately this adapter only becomes available when
> virtualbox program is started. My problem is how to start samba.
> If I don't add my eth* network card to smb.conf nmb cannot start:
>
> linux:~ # systemctl restart nmb
> Job for nmb.service failed because a timeout was exceeded. See "systemctl
> status nmb.service" and "journalctl -xe" for details.
> linux:~ # systemctl status nmb.service
> ● nmb.service - Samba NMB Daemon
>    Loaded: loaded (/usr/lib/systemd/system/nmb.service; enabled; vendor
> preset: disabled)
>    Active: failed (Result: timeout) since Sat 2017-08-26 13:15:15 CEST;
> 2min 31s ago
>  Main PID: 4663
>    Status: "nmbd: No local IPv4 non-loopback interfaces available, waiting
> for interface ..."
>     Tasks: 0 (limit: 512)
>    CGroup: /system.slice/nmb.service
>
> Aug 26 13:15:00 linux nmbd[4663]: [2017/08/26 13:15:00.610756,  0]
> ../source3/lib/interface.c:652(load_interfaces)
> Aug 26 13:15:00 linux nmbd[4663]:   WARNING: no network interfaces found
> Aug 26 13:15:05 linux nmbd[4663]: [2017/08/26 13:15:05.619116,  0]
> ../source3/lib/interface.c:652(load_interfaces)
> Aug 26 13:15:05 linux nmbd[4663]:   WARNING: no network interfaces found
> Aug 26 13:15:10 linux nmbd[4663]: [2017/08/26 13:15:10.626794,  0]
> ../source3/lib/interface.c:652(load_interfaces)
> Aug 26 13:15:10 linux nmbd[4663]:   WARNING: no network interfaces found
> Aug 26 13:15:15 linux systemd[1]: nmb.service: Start operation timed out.
> Terminating.
> Aug 26 13:15:15 linux systemd[1]: Failed to start Samba NMB Daemon.
> Aug 26 13:15:15 linux systemd[1]: nmb.service: Unit entered failed state.
> Aug 26 13:15:15 linux systemd[1]: nmb.service: Failed with result
> 'timeout'.
>
> I don't want samba to use my eth* network.
>
> This is my current smb.conf file:
>
> [global]
>     add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody
> -s /bin/false %m$
>     domain logons = No
>     domain master = No
>     local master = Yes
>     os level = 65
>     preferred master = Yes
>     security = user
>     wins support = No
>     workgroup = SAMBA
>     bind interfaces only = No
>     interfaces = vboxnet0
>     netbios name = LINUX
>     passdb backend = smbpasswd
>     usershare allow guests = No
>     ldap suffix =
>     wins server =
>
> [printer]
>     comment = laser-printer
>     guest ok = Yes
>     path = /var/tmp
>     printable = Yes
>
> This worked in openSUSE 12.2 with samba 3.x.
>
> What would be the way to configure samba in this case?
>
> Thanks,
>
> Istvan
>
>
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba


More information about the samba mailing list