5

BACKGROUND

Hi everyone, I am working on an animal welfare initiative on a budget of $0 using old machines etc., so if you can help with this you get a big lick up the side of the face as a thank you from the dogs (our organization is called Dog Friendly Society) ... we're very grass-roots, and in the process of getting a website up & running, so what I am trying to do is get our internal network set up for various purposes including collaboration, development & other experimentation ... this is both for the animal welfare group, and also for related commercial projects which will hopefully generate the funds required to support the vision & activities of the group ... so any help is greatly appreciated.

What I am trying to do is make samba work in the windows workgroup with & without passwords first ... and to then make it work in a domain, once some virtual machines (windows servers - running off the back of these 2 linux machines) are up & running.

PROBLEM

  • Win7 machine can see Ubuntu machine in WORKGROUP & access its share (user authenticated by samba)
  • other Win7 machine can see the first one (and vice versa), and they can both access each others' shares
  • Ubuntu machine however can see itself in WORKGROUP, can see the 2nd win7 machine in WORKGROUP
  • BUT ubuntu cannot see that first win7 machine who's user it was set up to share to

ENVIRONMENT GOAL

  • don't know if this is relevant, but here if it helps
  • 2 win7 laptops (to remain in simple windows workgroup/homegroup if possible)
  • 1 old computer will become bare-metal ubuntu printer & (possible) scanner server
  • 2 other computers set up as ubuntu servers hosting VMs for windows server machines (using VMWare Player) & samba file shares (some file shares for windows workgroup, while other shares are for Linux development/experimentation, MS SQL server & Sharepoint server in the as yet not set up domain)
  • so one ubuntu server will host a win server Active Directory Domain Services / Domain controller Virtual Machine, and the other will host a win server SQL & Sharepoint server VM
  • the underlying ubuntu servers need to serve some Logical Volume shares to the workgroup, and others for SQL server to use for the Sharepoint database

PLEASE NOTE

  • I am not asking for help with the Windows Server stuff, I have help with that elsewhere ... just trying to get Ubuntu ready for it, and wanted to preempt any questions about why I am doing it this way & thus to suggest another way, and just thought this background info may help you understand my end goals & perhaps help answer the question better - thanks :-)
  • I am running on a sub-net piggy backed off our landlord as we cannot afford the budget for our own internet connection yet ... so I cannot port forward etc. as yet ... this is all just set up work in preparation for when we do have the budget for that, and thus achieving our end goals

Here is the situation so far (on the first of the 3 linux machines):

UBUNTU SET-UP

  • I set up Ubuntu 13.04 server x64
  • did a sudo apt-get update & upgrade
  • installed the ubuntu-desktop (since I am new to command line administration)
  • installed required packages: samba & system-config-samba (UI)
  • created a volume group & logical volume for the samba share
  • mounted that to /shares/share-u64 (just so the name helps me identify it versus other possible shares)
  • modified fstab to automount that share location also (successfully)
  • modified /etc/NetworkManager/NetworkManager.conf > managed=true
  • modified /etc/network/interfaces > comment out: auto eth0 & iface eth0 inet dhcp
  • created my own network connection with static IP address, primary DNS set for soon to be created DNS Virtual Machine (also for active directory / domain controller as stated), and secondary DNS set to router/network extender for our subnet
  • modified /etc/default/avahi-daemon > AVAHI_DAEMON_DETECT_LOCAL=0

HOSTS FILE PREP

  • added info about the aforementioned windows server VMs I want to set up on this & another ubuntu server to the /etc/hosts file (though the VMs havent been created yet), including FQDN & Aliases for each (with the static IP addresses I intend to set for each machine) > Format: IP-Address Computer-Name.Domain-Name Alias_1 ... Alias_n
  • also added IP Add, FQDN & Alias for soon to be created 2nd ubuntu server
  • I figured it wouldn't matter adding this info to the hosts file early (before those VMs & the other ubuntu server were ready) as it would just ignore it or time-out any calls to those machines if the machines don't yet exist
  • later added entry for the win7 machine (the one that I can't see from ubuntu in the windows workgroup) to the hosts file with the line format: 192.168.1.x computer-name (but not including its FQDN since the domain controller isnt set up yet) - in an attempt to resolve the problem of not being able to see that machine from ubuntu in the workgroup (this solution appeared to have no effect)

SAMBA CONFIGURATION

  • configured the /etc/samba/smb.conf file (both via GUI & at command line - to double check & add things the GUI didnt allow), format as follows:

Global

  • workgroup =
  • netbios name =
  • usershare owner only = false
  • server string = %h server (Samba, Ubuntu)
  • wins support = yes
  • name resolve order = wins lmhosts hosts bcast
  • dns proxy = no
  • security = user
  • obey pam restrictions = yes
  • invalid users = root
  • passwd program = /etc/bin/passwd %u
  • passwd chat = Enter\snew\sUNIX\spassword: %n\n blah blah blah (dont think you need to know the rest of that line)
  • username map = /etc/samba/smbusers

share-u64

  • path = /shares/share-u64
  • writeable = yes
  • browseable = yes
  • valid users = trevor (and this user is set up & mapped to a win7 username)

I noticed that no lmhosts file existed (I tried finding it with sudo locate, but it was only in man pages but no actual working file), so I ran a command line instruction I found (sorry, didn't write that one down unfortunately), which apparently tells the nmbd service where to look for the lmhosts file or adds a new lmhosts file to the ones it uses (?) ... and then created an lmhosts file in that location with the entry format: - 192.168.1.X NETBIOS_NAME

... for the machine that I couldn't see ... then tried restarting the nmbd service & then rebooting the whole machine (and the win7 machine) ... but to no avail

OTHER THINGS TRIED

  • found a forum suggesting to change win7 local security policy for: Network Security: LAN Manager authentication level & also for disabling required 128-bit encryption ... but neither of these things made my win7 machine visible to the ubuntu machine, and I doubt they were what got the samba share running anyway, as I had seen plenty of tutorials on samba that never mentioned & didnt require this step

FINALLY

  • I have tried other things too, but forgotten what those things were (sorry, been awake days running working with hardware issues & windows server preparation before I even began this ubuntu & samba stuff ... but that is the bulk of it anyway, and many other things that I may have forgotten to mention hopefully won't be relevant as I did a sudo remove & purge on them
  • I tried to add a tag of "visibility" to this, which I thought would be helpful ... but said I needed 300 points rep to add a new tag ... so if anyone 300+ reads this, and you agree it's a good tag, perhaps add it (can others add tags to my post?)

THANKS

  • thanks in advance for your help :-)

UPDATE - WINDOWS NETWORK SETTINGS

ipconfig on affected win7 machine (possible relevant lines):

Windows IP Configuration:

  • Primary DNS Suffix = blank
  • Node type = Hybrid
  • IP Routing enabled = No
  • WINS Proxy Enabled = No

LAN Adapter Network Connection:

  • DHCP Enabled = No
  • Autoconfiguration Enabled = Yes
  • DNS Servers = IP Address for as yet non existent windows server which will be AD DS / Domain Controller & DNS; secondary DNS set to 192.168.1.1 (router)
  • Primary WINS Server = 192.168.1.30 (address of this ubuntu machine that I can't see it from)
  • Secondary WINS servers = IP Addresses for yet to be created VM & second ubuntu machine (also yet to be created)
  • NetBIOS over Tcpip = Enabled

... so I can't see anything wrong there, and the only difference with the other win7 machine is:

  • it has only 1 DNS server set (the router)
  • it has no WINS servers set

CRASH in gvfsd-network

  • just to add to info if this helps ... after a reboot & attempting to access windows workgroup, there was a crash in gvfsd-network
  • After following another piece of advice & rebooting both machines ... this same service crashed again when I logged in & tried to view the windows network via the file viewer UI ... so clearly something is wrong there

WINDOWS HOMEGROUP UPDATE

  • just out of curiosity, left my windows homegroup on that win7 machine, and it was unable to create a new homegroup (with error message): "Windows cannot set up a homegroup on this computer" ... which may or may not relate to this problem (?)

ACCESS WORKGROUP-VISIBLE WIN7 MACHINE ERROR

  • When I try to actually access the public shares on the 2nd win7 machine that I CAN see from Ubuntu in the workgroup (via file viewer UI), there is a message window at first that says:

"Opening COMPURER-NAME: You can stop this operation by clicking cancel"

... and eventually I get an error saying:

"Unable to access location: Failed to retrieve share list from server: Connection timed out"

  • so perhaps this is an indication that something in the hosts file is confusing Samba/Ubuntu (with respect to hosts that do not exist) ... I will try commenting out those lines to see how it responds after reboot (and report back with another point to this update)
  • RESULT: commenting out yet to be created servers in /etc/hosts file did nothing

WINDOWS REGISTRY CHANGES - suggested by Samba.org forum post

  • unfortunately the suggested Samba.org registry changes for win7, being:

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManWorkstation\Parameters]

DWORD DomainCompatibilityMode 1 DWORD DNSNameResolutionRequired 0

... did not fix the problem either

nmap 192.168.1.* - did not show the win7 machine

  • can however ping to both netbios / computer name & IP Address of win7 machine
  • possible conclusion is that network adapted settings on win7 are interfering (though this doesnt explain inability to see win7 shares on other win7 machine that is visible)
  • checking share settings of both win7 machines again to see if anything stands out, and will remove WINS server settings from the win7 machine with visibility problems

removal of non-existent host entries & Windows network troubleshooting

... and then rebooted, I could finally SEE my Win7 machine from Ubuntu in the Windows Network > Workgroup, though still not in the parent area to both those (in the file viewer UI) "Browse Network" (although both the router / gateway & other Win7 machine appear here).

  • However, I still cannot access the files on it ... though at least a step closer
2
  • are you able to paste the screenshots of ipconfig result for both Win7 machines in your question.
    – nixgadget
    Sep 3, 2013 at 5:13
  • Just added an update with that info for you Sep 3, 2013 at 6:16

2 Answers 2

2

PROBLEM SOLVED

... which led me to that link, and that minor change to the /etc/samba/smb.conf file (putting bcast first) solved the problem and solved it for BOTH win7 machines, so I can now not only see both of them, but browse their shares

LESSON LEARNED

  • so clearly the lesson learned here for me is that I cannot skip ahead, and this process of getting to my end goal is going to take some time, and I will have to make sure those Virtual Machines actually exist before I reference them anywhere

  • thanks to those who tried to help

1

Try this for a solution and also Can't access Ubuntu's shared folders from Windows 7

Also make sure SambaFS is installed by typing this into terminal:

sudo apt-get install smbfs
4
  • I tried that but got the message:Package smbfs is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: cifs-utils:i386 cifs-utils E: Package 'smbfs' has no installation candidate ... I haven't read those links yet though, I have to go out soon, I wil try it later tonight Sep 3, 2013 at 6:44
  • When I ran (from the first of those 2 links) smbtree, I got this > The program 'smbtree' is currently not installed. You can install it by typing: sudo apt-get install smbclient ... so I installed that, ran it again, and the result showed the win7 machine that I could already see, but not the one I am having trouble seeing ... I will try rebooting both machines now & see what happens with that smbclient installed Sep 3, 2013 at 7:24
  • see update: gvfsd-network services crashed again when I rebooted & tried to access the windows network ... I will have a look online & see if this gives me any clues Sep 3, 2013 at 8:02
  • I have tried most of the things in those two links ... so far, no joy, only some minor changes ... but I will check the registry setting advice that is linked in one of the comments from a Samba.org forum/discussion Sep 3, 2013 at 12:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .