Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 4064  / 3 Years ago, mon, september 20, 2021, 9:12:54

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 = EntersnewsUNIXspassword: %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_MACHINESystemCurrentControlSetServicesLanManWorkstationParameters]



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


More From » networking

 Answers
5

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




[#29635] Monday, September 20, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
untroo

Total Points: 3
Total Questions: 110
Total Answers: 95

Location: Palestine
Member since Thu, Oct 28, 2021
3 Years ago
untroo questions
;