Web lists-archives.com

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




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