LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Noob Wanting SuSE/Ubuntu/Vista Network (https://www.linuxquestions.org/questions/linux-server-73/noob-wanting-suse-ubuntu-vista-network-558358/)

rapsball4 06-01-2007 12:24 PM

Noob Wanting SuSE/Ubuntu/Vista Network
 
Hi,

I know absolutely nothing about networking - I came from a dialup only area where there was really no point. Now I have three computers: Ubuntu Studio (Feisty), Windows Vista Home Premium 64-bit, and SuSE 10.2 32-bit. I know with just Windows its as simple as connecting the cables through the router, but I don't even know how to network Ubuntu and SuSE together, or how to do the presumably harder job of networking them to Windows. I'd like to be able to share files as well as my printer (which is on the Windows). I will probably need fairly detailed help, just to warn you, but I would definitely appreciate whatever you can give.

sydney-troz 06-01-2007 01:53 PM

On Ubuntu, you should be able to (with a little searching through the menus; I use Kubuntu so I'm not familiar) find something about network places or a samba network. Samba is the software you'll probably use to network Linux w/ windows. On ubuntu, the windows machine should be found automatically, and there shouldn't be any extra work required. Not sure about SuSE.

For file sharing, both distros probably have a simpler method, but for setting up the Samba server by hand, http://computer-vet.com/tech/linuxfileserver.html is a good site.

rapsball4 06-01-2007 02:29 PM

Under "Network Places", "Windows Network" appears. When I click on it, though, there's nothing there. And the Ubuntu doesn't show up on the Vista's Network map, either.

Edit: And thanks for the link, but that is doing a FAT32 drive between them, whereas I'm trying to just let Windows access Ubuntu and SuSE's main drives in whatever format they're already in (ext3? can't remember).

I also found a "Connect to Server" menu in Ubuntu that I hadn't seen before, but not sure how to set it up. There is a service type for "Windows share" so I assume I want that. After that, it asks for Server, Share, Folder, User Name, Domain Name, and Name To Use For Connection - none of which I have any idea what to put. I tried playing around and putting Network (according to Windows, the name of its network) and WORKGROUP in a few different spots, but nothing could be accessed. More help needed please.

farslayer 06-01-2007 03:54 PM

Linux Pro Magazine had an issue recently that covered "Living with Windows Vista" all sorts of info about making Linux and Vista play well together. Might want to check your news stand for back issues if you are interested..

http://www.linuxpromagazine.com/issue/78

rapsball4 06-01-2007 10:10 PM

Unfortunately wasn't able to find any older ones still hanging around - picked up the next one just out of interest, but hasn't solved my problem. I'd order but I'm moving in 3 weeks and it says 2-4 for delivery, so that doesn't work out too well. If anybody could provide any more help, still would be greatly appreciated.

haydnc 06-02-2007 07:27 AM

I've run into this a couple of times before, but unfortunately I don't have my notes for setting this up with me on this machine, so my apologies if this is lacking something or seems a bit disjointed. In addition please realize that I'm writing these based on my Feisty install rather than Feisty Studio, but the base system should be similar enough for it to work:

I've not had much experience with SuSE, but this should get the Windows machine talking to the Ubuntu machine (hopefully).

First open a terminal (command prompt or whatever you want to call it) and enter the following:
Code:

sudo apt-get install samba winbind
If you also want to mount windows shared drives on the Ubuntu machine add smbfs and smbclient to that apt-get line.

Next open /etc/nsswitch.conf for editing with the editor of your choice - I've used gedit in this example:
Code:

sudo gedit /etc/nsswitch.conf
Have a look for the line that starts "hosts:" and add wins to the end of that line. I found out the hard way that when it's not added at the end of the line strange things start happening. The line from my updated nsswitch.conf file is:
Code:

hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4 wins
Next you have to create a share on your Ubuntu machine - it's a bit more picky than windows and I don't believe that you're able to share the whole drive. Instead select a folder for sharing - for this example I'll pretend you have a folder called shared in your home directory - right click on that folder and select "Share Folder" from the menu.

You should be able to select "Windows networks (SMB)" in the drop down menu labeled "Share through:". If it's not there I'd suggest that you check that samba is installed properly. Otherwise give the new share a name (this example would default to "shared") and decide if you want it to be read only.

Please note that even if you don't have the Read only box checked, if the permissions on the drive are not set to allow "Others" write access, they will not be able to write to the share. To fix this Right Click the same folder, select Properties then the Permissions tab and alter the Folder Access under Others to read / write and if necessary also check the Excecute checkbox to allow remote users to execute the file also.

Lastly in my experience Windows and Linux (any breed) may not play well together as both tend to have networking security enabled by default - meaning that special usernames and passwords have to be set up on each system to allow communication between them.

If you're not that worried about security, maybe because you're working on a private network without concerns on who will have access to the file, you can edit the /etc/samba/smb.conf file and change the line in the Authentication section from security = user to security = share.

If you do this, access to files is controlled by whatever security permissions you have on individual files and folders.

If you're a bit more concerned about your security setup and you want more direct control over which users can access files and which can not edit your samba setup and add your Windows to samba, where username is the login name of your Windows (use the same password for both accounts)

Code:

sudo  smbpasswd -a username
 
 New SMB password:
 Retype new SMB password:
 Added user username.

For more information, please read this document:

https://help.ubuntu.com/community/SettingUpSamba

I'm a little unsure how that one works because I used the first setup option but a bit of reading should help you clarify which approach is better for you.

Once your share is set up and various permissions applied you should be able to access it from the windows machine by entering:
\\feisty-machine\shared\

Likewise you should be able to access any shares on the Windows machine using:
smb://windows-machine/sharename/
You may get prompted to enter the username and password of the windows machine to access the windows share. It would depend on how it was set up. I may be wrong about this bit, but from memory nothing shows up as networked on windows machines until such time as a public share is set up on the windows machine. However I might be wrong about that as it's late, I'm tired and I've never played with Vista.

I hope this has been some help, good luck getting things working. With some luck you'll be able to adapt at least some of that to work on your SuSE machine.

rapsball4 06-02-2007 10:50 AM

Thank you very much - that seems to have gotten me closer, but not there yet. I used the first simpler setup because its just for me and possibilities housemates next year that I have no problem sharing with.

They're still not accessing each other, but each seems to acknowledge that the other is there now. In the Network page of Vista, WORKGROUP now shows up, but I can't log into it with either my Linux username and password of my Windows username and password. Entering \\feisty-machine\shared\ says it can't be found. On the Ubuntu, entering smb://windows-machine/sharename/ says that the contents can't be displayed and browsing there through Network gives a message saying that the contents say its a "desktop configuration file" while the name says its a Samba share, so it can't be opened. Same error messages one way or another for trying a few slightly different ways of entering them.

wayno 06-02-2007 07:07 PM

Quote:

Originally Posted by rapsball4
Thank you very much - that seems to have gotten me closer, but not there yet. I used the first simpler setup because its just for me and possibilities housemates next year that I have no problem sharing with.

They're still not accessing each other, but each seems to acknowledge that the other is there now. In the Network page of Vista, WORKGROUP now shows up, but I can't log into it with either my Linux username and password of my Windows username and password. Entering \\feisty-machine\shared\ says it can't be found. On the Ubuntu, entering smb://windows-machine/sharename/ says that the contents can't be displayed and browsing there through Network gives a message saying that the contents say its a "desktop configuration file" while the name says its a Samba share, so it can't be opened. Same error messages one way or another for trying a few slightly different ways of entering them.

Don't forget that just because your machines are connected via ethernet cables, doesn't automatically mean they know each others names! On the Linux mahcines, edit /etc/hosts and enter details for the other two machines, like:

192.168.1.10 vista
192.168.1.11 suse

In Vista, the equivalent is C:\Windows\System32\Drivers\Etc\hosts and the syntax is the same. make sure you can ping each machine from each machine by name before you continue.

Secondly, remember that everything in Linux is case-sensetive, even usernames. So check your Vista user accounts and if they have an initial capital letter, you must enter the name this way when connecting from Linux. I share drives and printers between several Fedora FC5/6 machines and XP Pro and found that it was way easier to configure all user accounts to be identical on every machine (if you have more than a handful of machines and users, you may wnt a centralised directory server but let's not go there for 3 machines).

To connect to the Windows printer, you will probably use smbclient:// - here are some tips for it.

rapsball4 06-02-2007 08:09 PM

Alright, I've found those files and opened them up in an editor, but as I believe I mentioned in my original post, I don't know a thing about networks coming from a dialup only area. How do I know what it is I'm adding to each one?

wayno 06-03-2007 12:53 AM

Quote:

Originally Posted by rapsball4
Alright, I've found those files and opened them up in an editor, but as I believe I mentioned in my original post, I don't know a thing about networks coming from a dialup only area. How do I know what it is I'm adding to each one?

OK so I was jumping ahead of you. You need to know the netBIOS name and IP address of each of your computers. Do you have some device on the network that is assigning addresses to the computers? If you have a DSL router for example, most will have a DHCP server built in that assigns addresses to each computer that connects. Otherwise you will need to do this manually. You´ll should Google for specific ´how to´ instructions for each OS you are using.

To find out the current details in WinXP, go to Start --> Run and type ´cmd´. Then type ´ipconfig´ to get the IP address and ´hostname´ to get the hostname.
In Linux, open a terminal and type ´ifconfig´ for the IP address and ´hostname´ for the hostname.

haydnc 06-03-2007 03:30 AM

Again, forgive me if this rambles on a bit - I'm working through it step by step on my own machine trying to break things down to their most basic level so that there are no chances for confusion or misunderstanding. If your level of ability is above what I've done here... be patient. :)

Quote:

They're still not accessing each other, but each seems to acknowledge that the other is there now.
At least this is heading in the right direction for getting it all sorted out. :)


Quote:

In the Network page of Vista, WORKGROUP now shows up, but I can't log into it with either my Linux username and password of my Windows username and password.
It has been quite some time since I last played with networking in Windows, and I've never touched Vista, but from memory this used to happen to me when the windows machine didn't have any folders shared.

I'm going to suggest leaving attacking the problem from one machine at a time, and start with the Ubuntu machine as that's what I've got the most recent experience with.

Quote:

Entering \\feisty-machine\shared\ says it can't be found. On the Ubuntu, entering smb://windows-machine/sharename/ says that the contents can't be displayed and browsing there through Network gives a message saying that the contents say its a "desktop configuration file" while the name says its a Samba share, so it can't be opened. Same error messages one way or another for trying a few slightly different ways of entering them.
Take this back a step - verify that samba and the share on the Ubuntu machine is correctly set up.

Open a file browser window (Places - Home Folder) and in the location bar put in:
Code:

smb://feisty-machine/shared
If that takes you to the folder you've shared on the Ubuntu machine your samba and share is correctly set up. If not double check the samba installation (System - Administration - Synaptic Package Manager : search for samba).

If that is installed check that the share and permissions on the shared folder are correctly set up. Probably the quickest way to do that is to open a Terminal window (Applications - Accessories - Terminal) and type in:
Code:

ls -l
In addition to whatever else is in your home directory you should see an entry that resembles:
Quote:

drwxr-xrwx 2 haydnc haydnc 4096 2007-06-03 19:28 shared
That's the shared folder that you've set up. If the letters at the front don't match what you see above, particularly the last "rwx" before the "2" it could be that the permissions are set incorrectly which is stopping it from being viewed on the network.

In your terminal window type:
Code:

chmod 757 shared/ -R
The -R just makes sure that anything contained within that folder also have matching permissions on them.

Lastly you can verify that the share it's self is set up correctly by viewing the /etc/samba/smb.conf file (where you changed the security = share earlier). Right at the very bottom of that file should be an entry that resembles this:
Code:

[shared]
path = /home/haydnc/shared
available = yes
browsable = yes
public = yes
writable = yes

Obviously the path will be the path to the shared folder in your home directory but everything else should be pretty much the same. At this point you could enter this information manually into the smb.conf file if it's absent but you'd need to be editing the file with admin privileges to do so:
Code:

sudo gedit /etc/samba/smb.conf
Now if you enter smb://feisty-machine/ whilst in a browser window on the feisty machine you should at least see that folder listed, if you put in smb://feisty-machine/shared you should see the contents of that folder. If it's not working at that point then the whole problem is beyond me and my ability to fix.

Assuming that works:
Once you've verified that the share is set up and working on the Ubuntu machine, it's time to look at the other machines and get them talking to the Ubuntu one.

When we installed Winbind the other day that should have taken care of the problem where each machine couldn't recognize the other using hostnames, but that is a valid point wayno makes and the easiest way to verify it is by getting the ip addresses of each machine and then trying to ping twice, once by hostname and once by ip address.

To get the IP address on the Ubuntu machine go to the Terminal you opened earlier and type:
Code:

ifconfig
The information you're looking for is probably listed under eth0 and it'll be called inet addr:. I'm guessing that you've either got a router that assigns ip addresses or something similar. Typical values would be: 192.168.0.10 or 172.0.0.50 or possibly 10.0.0.25 or something along one of those lines.

On the Vista machine open a command prompt (Start - Run - type cmd in the run window) and in the command prompt window type:
Code:

ipconfig
Whatever ip address the windows machine has should be very similar to the one the feisty machine has, it might be 192.168.0.12 for example.

Once you've got those ip addresses you should be able to ping each machine from the other. On the Ubuntu machine terminal type:
Code:

ping <windows machine ip address> -c 4
or
ping vista-machine -c 4

The -c 4 just stops it from pinging forever.

On the vista machine's command prompt type:
Code:

ping <feisty machine ip address>
or
ping feisty-machine

Important note:
I just found out that if the windows fire wall is set up do disallow file and print sharing it'll kill all ping attempts and the ability to share information between the Vista machine and any other machine on the network. Again, I don't know Vista at all, but a google search should turn up a way to enable file and print sharing to get through the windows fire wall in Vista.

If pinging works between the machines you should be able to access the share you've set up on the feisty machine.
Open a file browser, either by using the Windows Key - E combination or exploring My Computer or whatever the current version is.

In the address bar of your explorer type:
Code:

\\feisty-machine\shared
If that doesn't take you straight to the shared folder on the feisty machine you should have another look at your windows firewall setup - it wouldn't be the first time windows was blocking all network access and I understand that the firewall setup on Vista is more restrictive than it ever was on Windows XP.

Lastly, you should be able to duplicate pretty much everything done on the Feisty machine on the SuSE machine. I believe that SuSE is KDE based so doesn't use Synaptic to install packages, but I seem to recall that it does have some kind of package manager, so you should be able to find that and get samba (and presumably winbind) installed. Once they're up and running you should be able to ping between your SuSE machine and your Ubuntu one even if the Vista firewall is causing problems.

Good luck, hopefully something in that lot will help you sort things out.

rapsball4 06-03-2007 12:52 PM

My level of understanding was basically nothing, so that was great. I've pinged to each machine to make sure they can find each other, both by name and by IP. I've changed both host files with what I've found. The shared information was not in the samba config file at all, but it was still showing up in the Shared Files from the System menu, so I manually added that to the config. Now I can open the Ubuntu share on the Ubuntu, so that stage is done.

The Ubuntu still shows up on the Windows, but still can't open it. It asks for a username and password, and won't accept anything I've tried using my Windows and Ubuntu logins (including root). Same thing is basically true the other way around - Windows Network is still showing up in the Ubuntu Network page, but is empty when I click on it and says that the contents can't be shown when I directly enter the path to the shared folder on the Vista. Tried completely deactivating my AVG Firewall just to see if that was the problem, and it didn't help at all.

haydnc 06-03-2007 11:11 PM

Quote:

Originally Posted by rapsball4
The Ubuntu still shows up on the Windows, but still can't open it. It asks for a username and password, and won't accept anything I've tried using my Windows and Ubuntu logins (including root).

Part of that could just be that I really really don't know Vista well enough to help get everything right, however from your description it sounds like a combination of two things:

First (and pretty much impossible for me to give any help with) is the AVG Firewall. For the purposes of setting your network up and getting your machines 'talking' to one another I'd personally suggest disabling it at least temporarily while you test networking and changes on your network setup. There might be some way to tell it that any communication on your LAN is safe and just to let it all through, but that kind of thing you'll need to work through on your own.

Secondly it really really sounds like your Ubuntu machine is still approaching all network security the wrong way.

I know I've mentioned this before but if you open a terminal and type in:
Code:

sudo gedit /etc/samba/smb.conf
Once you've got the file open scroll down to the part that says:
Quote:

####### Authentication #######
In my smb.conf file this is on line 85.

Directly below that line there are 4 lines of commented out code (code with a # in front of it) explaining why setting up security in a certain way is a good idea. Directly below that is a line that says:
Quote:

; security = user
You may or may not have the semicolon in front of it, it may just read security = user.

We want that line to read:
Code:

  security = share
please note that it does not have a # or a ; in front of it. This is very important.

Once that is set up correctly (or if it already has been - I can't recall if we'd been over that before) save and exit your smb.conf file.

In order to make sure that these settings take effect in the terminal window type:
Code:

sudo /etc/init.d/samba restart
That'll at least make sure that any changes have been recognised.

If you still can't access the feisty share from the windows machine using \\feisty-machine\shared with the firewall turned off I'm out of ideas.

The only two things I can think of trying are:
Leave the Ubuntu machine for now and start working through the same changes on the SuSE machine you have. Find the package manager (I think it's called YaST), install samba, make sure that the samba machine can ping the Ubuntu one and then try accessing the share on the Ubuntu Feisty machine from the SuSE one by the same method as before - open a file browser window and type:
Code:

smb://feisty-machine/shared
I have not heard of SuSE having networking problems with another Linux machine, but that could just be because I don't hear much about SuSE.

As far as accessing files to/from the Vista machine goes, just putting in your username wouldn't be enough. Windows typically only uses the username on its own when you're already on the machine in question. So if you put \\vista-machine\shared in a file browser window on the Vista machine it should, in theory, work perfectly - just like doing the same equivalent on the Feisty machine did.
To access a share on a windows machine from a ubuntu machine the whole username / password thing would be a little different than you're used to. For example:

On your Feisty machine you open a browser window (Places - Home Folder). You want to type in a network location so you hold Ctrl and press L to bring up the 'Location' bar. Type in:
Code:

smb://vista-machine/share-name
It'll ask you for a username / password to access the Vista system.
Normally your first instinct is just to type in:
Code:

Username: vista-machine-user-name
Password: vista-machine-password

But that doesn't work - you know it doesn't work because you've tried it, so instead you type in:
Code:

Username: vista-machine-name\vista-machine-user-name
Password: vista-machine-password

My Feisty setup usually asks me if i want to store the password - tell it what you want to - it can be a useful thing to set up.

I'm going to stop this here - it's starting to ramble on fairly randomly. Sorry if the posts are so long you have to wade through tonnes of rubbish to find things relevant to the problems you're having. All I can say is don't skip anything because that would be like typing in half a word and then wondering why the person you were sending the word to couldn't tell what it was you were typing. ;)

I really think that if you can't make your machine talk to vista for now you'd be much better off trying to make Ubuntu Studio and SuSE talk to one another. You're more likely to get SuSE help on here than you are to get Vista help.

rapsball4 06-04-2007 09:34 AM

Quote:

First (and pretty much impossible for me to give any help with) is the AVG Firewall. For the purposes of setting your network up and getting your machines 'talking' to one another I'd personally suggest disabling it at least temporarily while you test networking and changes on your network setup. There might be some way to tell it that any communication on your LAN is safe and just to let it all through, but that kind of thing you'll need to work through on your own.
Did that just in case, but didn't change anything.

Quote:

please note that it does not have a # or a ; in front of it. This is very important.
There was a semicolon that I didn't see the first time - specifically warning to look for it this time was definitely a good thing.

For the username thing, Vista automatically added the computer name before it, so I had already come to that conclusion, but thanks again for the thoroughness.

With that semicolon gone, it is letting me access the Ubuntu without a username or password again from the Vista. But for the other way, I'm still getting "The Folder contents can't be displayed. Sorry, couldn't display all the contents of "Pictures" (the one I set up to share from the Vista)" on the Ubuntu when I try to open any of smb://vista-machine or smb://vista-machine/Public or smb://vista-machine/Pictures.

I haven't tried anything on the SuSE yet other than pinging the other two, but I'll do that later today and give an update there. Thanks again for everything so far.

rapsball4 06-04-2007 12:55 PM

Ok, update since I tried to emulate those things from Ubuntu over to SuSE. Changed the host files of all three so that the other two are in them. Manually added the shared folder to the smb.conf file on the SuSE. Disabled the firewall after it said it couldn't read the Samba network possibly due to a firewall - same message I still get but only on the Samba shares page and not when I directly enter the other computer's name in the address bar.

Current status:

Windows accessing Ubuntu: Works fine - yay!

Ubuntu accessing Windows: Error message about folder content not being able to be displayed

Ubuntu accessing SuSE: Works fine, but doesn't show up in network on its own; must be searched for by entering it in the address bar

SuSE accessing Ubuntu: Error trying to open the main Samba shares file, but works by entering it in the address bar

SuSE accessing Windows: "Timeout on server" error

Windows accessing SuSE: Computer shows up under Network on the menu bar on the left, not in the main window. Clicking on it shows the folder I have set to share as well as the default shares from it, but clicking on my shared folder brings up a message that says the folder is empty (its not).

haydnc 06-06-2007 06:04 AM

I'm pretty much out of bright ideas at this stage, so we might have to wait for someone else to jump on in to help.

The fact that neither linux machine can access windows says to me it's a windows firewall thing or a windows password thing, either way having no experience with Vista's setup I can't really help. I can only suggest you go and poke around in your firewall settings and see if you can find a place to enable exceptions for file and print sharing on your network.

The only other thing I can think of that it might be worth checking is if all machines are using the same workgroup/domain.

It really shouldn't make any difference as long as you've set up permissions on the shared drives and files correctly (chmod 757 dirname -R) using a terminal.

However, if you want to make sure - the Feisty machine open a terminal window and type:
Code:

sudo gedit /etc/samba/smb.conf
Hunt through the file until you find the section called:
Quote:

#======================= Global Settings =======================
A few lines under there (line 26 and 27 in my smb.conf file) you should see:
Quote:

# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = WORKGROUP
You should change the "WORKGROUP" to whatever you call your home network - or whatever it's called on the Vista machine. Workgroup is fairly standard, but Microsoft used to have their home use products accessing a workgroup called "MSHOME" so if that is the "workgroup" that Vista thinks it is in, it might be worth changing it on the Ubuntu (and presumably the SuSE machine also.

If I can think of anything else at all, I'll let you know.

Good luck.

rapsball4 06-06-2007 12:05 PM

Quote:

The fact that neither linux machine can access windows says to me it's a windows firewall thing or a windows password thing
I completely disabled the firewall to try this, though, and I tried both with and without an account password - there was no change without the firewall and no change having a password on my account or not.

And thanks for yet another idea, but my Workgroup is listed as Workgroup on Vista, which is what the config file said. I tried MSHOME anyway, and no change. I've basically given up at this point - if you come up with something, I'd still appreciate it, but I don't really expect this to get working. Thanks again for all the effort.


All times are GMT -5. The time now is 09:14 PM.