I’m running Opensuse Tumbelweed on a host and 12.1 (XFCE) on a virtualbox. I’m trying to get into networking more so I can learn what’s going on. Right now I have both machines visible and they can see each other on the network. I can also see each user/home folder for the user, but when I try to login to either it asks for a username or password. No matter what I enter it won’t let me access the home folder for the host or the guest. I’ve already gone through yast’s samba tool and setup folder sharing and made sure guest login was enabled. What else am I missing?
Also, just a quick question. What’s the command to restart the samba service from the command line?
To access the shares, add the username to the samba user database see here: Samba LAN Primer
Also, enabling guest access in Yast (IIRC) is only the start of the process.
If you have further issues after reading the reference, post here the contents of the file smb.conf (in /etc/samba/) plus the response you get from this command:
I’m a little bit further now, but at a road block. The result of
su -c "ls -l /var/lib/samba/usershares"
on both the client and the host say “Total 0.”
It’s to the point now where I can see and browse for the files on the host computer, but when the host tries to even open the virtual machine it can’t seem to find it on the network. For troubleshooting I have both firewalls turned off.
Here is the smb.conf for the host:
dave@linux-g6ar:~> cat /etc/samba/smb.conf
# smb.conf is the main Samba configuration file. You find a full commented
# version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
# samba-doc package is installed.
# Date: 2011-11-02
[global]
workgroup = WORKGROUP
# name resolve order = bcast host lmhosts wins
passdb backend = tdbsam
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
map to guest = Bad User
include = /etc/samba/dhcp.conf
logon path = \\%L\profiles\.msprofile
logon home = \\%L\%U\.9xprofile
logon drive = P:
usershare allow guests = Yes
add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
domain logons = No
domain master = No
security = user
usershare max shares = 100
wins support = No
wins server =
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes
[profiles]
comment = Network Profiles Service
path = %H
read only = No
store dos attributes = Yes
create mask = 0600
directory mask = 0700
[users]
comment = All users
path = /home
read only = No
inherit acls = Yes
veto files = /aquota.user/groups/shares/
[groups]
comment = All groups
path = /home/groups
read only = No
inherit acls = Yes
[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @ntadmin root
force group = ntadmin
create mask = 0664
directory mask = 0775
## Share disabled by YaST
# [netlogon]
[Dave Home]
comment =
inherit acls = Yes
path = /home/dave
read only = No
dave@linux-g6ar:~>
and here it is for the virtuabox client
dave@linux-xng5:~> cat /etc/samba/smb.conf
# smb.conf is the main Samba configuration file. You find a full commented
# version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
# samba-doc package is installed.
# Date: 2011-11-02
[global]
workgroup = WORKGROUP
passdb backend = tdbsam
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
map to guest = Bad User
include = /etc/samba/dhcp.conf
logon path = \\%L\profiles\.msprofile
logon home = \\%L\%U\.9xprofile
logon drive = P:
usershare allow guests = Yes
add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
domain logons = No
domain master = No
security = user
usershare max shares = 100
wins support = No
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = Yes
read only = No
inherit acls = Yes
[profiles]
comment = Network Profiles Service
path = %H
read only = No
store dos attributes = Yes
create mask = 0600
directory mask = 0700
[users]
comment = All users
path = /home
read only = No
inherit acls = Yes
veto files = /aquota.user/groups/shares/
[groups]
comment = All groups
path = /home/groups
read only = No
inherit acls = Yes
[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @ntadmin root
force group = ntadmin
create mask = 0664
directory mask = 0775
## Share disabled by YaST
# [netlogon]
[XFCE Home]
comment =
inherit acls = Yes
path = /home/dave
read only = No
dave@linux-xng5:~>
I tried adding “name resolve order = bcast host lmhosts wins” to both configs, but when I did that and restarted samba none of the machines were visible to each other. So I commented that line out.
By the way, thanks for that link. It’s helping me understand this all a bit better.
I have set my virtual machines to have bridged networking so I can run them as a full member of the LAN, with the same subnet (like 192.168.1.2, 192.168.1.3,4,5… etc). Do you use that method too?
On the host (KDE opensuse tumbleweed) I tried using the smb://IP-of-virtualbox and I couldn’t get anywhere. With the reverse, using the virtual machine and trying to connect to the host I was successful. I don’t know if this provides any clues.
If you bridge the eth0 of the guest vbox, won’t it line up ok with an address like the address of the wlan on the host, and then samba will work (maybe)? Internet should work too because it will see the college router.
Or you can give the guest a fixed IP address like 192.168.182.250 or 192.168.182.13 (well away from the gift of the DHCP server in the router).
Or you can maybe use the private option called “internal network” (never tried that myself).