File Sharing

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read this

File Sharing

Postby charron on Tue Nov 24, 2009 4:18 pm

I'm somewhat new to linux and have tried various distros. I like Mint so i'm sticking with it for now. I need some help on sharing my linux mint computer with my other windows computers that are hooked up on DSL with a wireless router. One laptop has xp and the desktop has vista 64. The linux mint has ext3 file system and the windows computers are ntfs. I have tried to follow the posts here with respect to sharing but find it difficult to read numerous responses to a post. I want to share files between the windows computers and the linux machine. To start off i am trying to get my laptop with xp to see the linux machine and a shared folder from linux. Haven't been able to accomplish that and the linux machine doesn't see the windows machine. Can someone run through the whole process from the beginning step by step. Here's what i tried: I shared a folder in home. I edited the smb.conf file to workgroup and i assumed the netbios name was supposed to be that of the linux machine? rick-desktop? I was able to see the linux machine in my workgroup on windows xp but couldn't connect. This is as far as i got. All computers are running on wireless and they are all working. Any help would be appreciated and remember i know nothing from linux. Sometimes these posts assume we non linux users can understand the linux jargon when we don't yet. I'm working on it.

Thanks,
Rick.
charron
Level 1
Level 1
 
Posts: 3
Joined: Tue Nov 24, 2009 3:51 pm

Linux Mint is funded by ads and donations.
 

Re: File Sharing

Postby charron on Sat Nov 28, 2009 4:51 pm

No one wanted to help so i've gone to ubuntu. At was able to get it to work properly without any configuration of smb.conf file.

Thanks.
charron
Level 1
Level 1
 
Posts: 3
Joined: Tue Nov 24, 2009 3:51 pm

Re: File Sharing

Postby 714snoopy on Wed Dec 02, 2009 8:25 pm

charron - (People will help if they know how to help)

1st:
I have also had this problem since using Ubuntu and now Mint on my home network; Linksys router with two WinXP machines and one Ubuntu/Mint laptop. And I also tried an old SMC router I had laying around. Network works fine and all are in the same "workgroup". In nautilus, I should be able to type "smb://<machine-name>" and be able to see any shares on that machine. But I don't and I get a generic "not found" error. What does work is if I specify the IP address of the computer I'm trying to connect to: "smb://192.168.1.10", for example. Now, what's weird is at my work I have a Mint6 box running on the network and I can use the human readable machine name, i.e. "smb://buffalo" and it works fine. I don't know what is different about my home network?

2nd:
How did you get your situation to work without any smb.conf editing?

Thanks!
User avatar
714snoopy
Level 1
Level 1
 
Posts: 13
Joined: Wed Dec 02, 2009 7:51 pm

Re: File Sharing

Postby charron on Fri Dec 04, 2009 6:46 pm

When i had mint 7 installed i had upgraded it to a newer kernel? and then RC1 and then i installed the newest version of 8 going the upgrade route. Because i also lost my wireless when upgrading to 8 it created another problem for me because i was using wireless, so i decided to go back to ubuntu. I had used ubuntu 9.04 in the past so i installed 9.10 and wiped out mint. After installing Ubuntu 9.10 i set the public folder in home to share and on my xp desktop i set the public folder to share and on my vista 64 desktop i turned on network discovery, file sharing, public folder sharing and i set it to private network. I also set the public folder to share. Both XP and Vista 64 were set to workgroup and since Ubuntu 9.10 has Samba installed and i think Nautulus file sharing; and i know the smb.conf file is set to workgroup. So i tried sharing again and using my XP machine it saw the Ubuntu-Desktop in the Network Icon so when i double clicked on the ubuntu-desktop it opened the windows password box and i put in the password i set on ubuntu and it worked. I can also use the ip address and all three computers are sharing the folders that i set to share. I think it is sharing through samba not the nautalis share. I'm not exactly sure what nautalis sharing does as oposed to samba share? I've only started using linux recently and i'm not up to speed on things yet. I just know that in Vista especially it is difficult to share the whole drive with the UAC and security., but i haven't tried that yet since i actually got the sharing working. I just found it easier to install or re-install ubuntu then fooling around with the terminal and trying to get sharing working by editing the smb.conf file and restarting samba etc since im not a linux expert. I did however try mint 8 from the live cd and my wireless works so at some point i will try installing it again and play with the sharing. Hopefully it works this time without any issues. I just want to learn more about linux and its hard because some of the explanations on the forum aren't explained step by step. Some of us have to figure out what some of these steps or explanations mean. Since no one had replied i just gave it my best shot and tried ubuntu first since mint 8 full wasn't out yet. Now it is and i will eventually give it another try. Thanks for the response.

Rick.
charron
Level 1
Level 1
 
Posts: 3
Joined: Tue Nov 24, 2009 3:51 pm

Re: File Sharing

Postby 714snoopy on Wed Dec 09, 2009 3:24 pm

Good to hear you got something working!

From my experience, Nautilus uses the Samba service to do its sharing. I think when you share something via Nautilus, it writes a separate configuration file somewhere else and not necessarily in the system's samba.conf file. Can anyone confirm that?

My networking issues were resolved by changing out the brand of router I was using. For some reason, with my Linksys router (WRT54G), NetBios names do not seem to work. I have to use IP addresses to find any shares on other computers. I borrowed a Netgear VPN/Firewall router from my work and now I can just use computer names to find them on the network! I'll have to fiddle with the Linksys setting some more and see if I can get it to work. But for now, I'm good! :mrgreen:

What kind of problems did you have with wireless in Mint8 after your upgrade? I have a similar issue with a laptop that I installed Mint8 (fresh) and it does not detect the wireless card at all. Its a Toshiba with a Realtek wireless card, I believe. I'll have to try the Live CD and see if it works like you saw.

Thanks and keep plugging away!
User avatar
714snoopy
Level 1
Level 1
 
Posts: 13
Joined: Wed Dec 02, 2009 7:51 pm

Re: File Sharing

Postby altair4 on Wed Dec 09, 2009 4:42 pm

714snoopy wrote:From my experience, Nautilus uses the Samba service to do its sharing. I think when you share something via Nautilus, it writes a separate configuration file somewhere else and not necessarily in the system's samba.conf file. Can anyone confirm that?

Classic Samba uses smb.conf to define shares, Sharing through nautilus ( called nautilus-share, usershare, or simple sharing ) uses /var/lib/samba/usershares. There still is a relationship between nautilus-shares and smb.conf though. To see the share definitions you can type the following in a Terminal: net usershare info

For more fun facts about Nautilus-Share :wink: : Simple File Sharing in Mint: viewtopic.php?f=42&t=23169

My networking issues were resolved by changing out the brand of router I was using. For some reason, with my Linksys router (WRT54G), NetBios names do not seem to work. I have to use IP addresses to find any shares on other computers. I borrowed a Netgear VPN/Firewall router from my work and now I can just use computer names to find them on the network! I'll have to fiddle with the Linksys setting some more and see if I can get it to work. But for now, I'm good!

That's very interesting. You might want to post that observation here: viewtopic.php?f=90&t=36861&start=0 . as he is using the same router and has the same problem. Just to make sure I understand you, You didn't make any other changes to your system but just replace the router and name resolution was fixed?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 15
Level 15
 
Posts: 5515
Joined: Tue Feb 03, 2009 10:27 am

Re: File Sharing

Postby 714snoopy on Wed Dec 09, 2009 6:05 pm

Yes, that is correct. All I did was replace the Linksys router with the newer Netgear one and everything worked. In fact, if I then plug the Linksys router INTO the Netgear one (because I was using it like a wireless access point) I loose NetBios functionality again. Somehow, the Linksys router is messing up NetBios somehow.

I will look at the other thread and post my observations.

Thanks!
User avatar
714snoopy
Level 1
Level 1
 
Posts: 13
Joined: Wed Dec 02, 2009 7:51 pm

Re: File Sharing

Postby altair4 on Wed Dec 09, 2009 6:11 pm

It's funny, that Linksys router is everywhere. There's no way we'll ever be able to find out, but I wonder how many of the posters in all the linux forums with name resolution problems have that router in common.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 15
Level 15
 
Posts: 5515
Joined: Tue Feb 03, 2009 10:27 am

Re: File Sharing

Postby 714snoopy on Wed Dec 09, 2009 7:07 pm

Exactly what I was thinking ... and posted in the other thread you mentioned.

Lets have everyone who sees this thread post what hardware they have. Specifically, routers on a home network.

Funny thing, my ISP did something where I lost connection to the internet even though nothing about my Linksys router had changed. I dug out my old SMC router and I was able to get back to the internet. I decided to mess around more and that's when I borrowed the Netgear router from work. Its pretty new compared to the Linksys and the SMC. Maybe that has something to do with me getting my network machine names to work?

Anyway, thanks for pointing me to that other thread ... I think ... what a blood bath! :shock:
User avatar
714snoopy
Level 1
Level 1
 
Posts: 13
Joined: Wed Dec 02, 2009 7:51 pm

Re: File Sharing

Postby altair4 on Thu Dec 10, 2009 10:07 am

I noticed on the other thread that although you can now access the share by machine name you still get an "cannot retrieve list error" when you go to "Network". If your willing and you still have the "borrowed" router you might try this experiment:

Open Terminal
Type sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
This will make a backup copy in case my advice makes a mess of things
Type gksu gedit /etc/samba/smb.conf
Look for a line that looks like this:
; name resolve order = lmhosts host wins bcast

Get rid of the ";" in front of that line and switch around the order of the arguments so that is looks like this:
name resolve order = bcast host lmhosts wins

Save the file and go back to the terminal
Type sudo service samba restart

The next step is important and you have to not laugh at this suggestion but wait about 5 minutes. Windows goes through a little dance every time a new client enters the network at it takes a while to settle down.

Then go to Network and see if you can see the server list.

If it doesn't work and you want to restore your original smb.conf file:
Open Terminal
Type sudo cp /etc/samba/smb.conf.bak /etc/samba/smb.conf
Type sudo service samba restart
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 15
Level 15
 
Posts: 5515
Joined: Tue Feb 03, 2009 10:27 am

Re: File Sharing

Postby 714snoopy on Thu Dec 10, 2009 1:16 pm

altair4,

Thanks for the suggestion. I tried something before I saw your post that worked perfect for me, however.

http://ubuntuforums.org/showthread.php?t=88206

Basically, it involves editing the /etc/nsswitch.conf and installing the winbind service. I can now ping by machine name and smbtree returns a complete list of computers on my network. And, last but not least, opening "Network" shows all the network computers as well!

Thanks for the tip on editing the smb.conf. Looks like you had the similar idea of enabling the name server. Its interesting that, with the procedure I did above, that samba is working now despite having wins not even enabled in smb.conf. What is nsswitch.conf anyway? Name Server Switch? I'll keep your suggestion in mind when messing around with other networks ... or mine later!

Thanks for the tip! :P
Last edited by 714snoopy on Thu Dec 10, 2009 1:58 pm, edited 1 time in total.
User avatar
714snoopy
Level 1
Level 1
 
Posts: 13
Joined: Wed Dec 02, 2009 7:51 pm

Re: File Sharing

Postby altair4 on Thu Dec 10, 2009 1:24 pm

Now the big question is - using which router? Does it also work with the Linksys router?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 15
Level 15
 
Posts: 5515
Joined: Tue Feb 03, 2009 10:27 am

Re: File Sharing

Postby 714snoopy on Thu Dec 10, 2009 1:57 pm

That's a good question. Everything is working now with the newer Netgear router ... I have not tried Linksys router yet.

I'm almost afraid to try it now that it all works! But, in the interest of this thread, I'll give it a shot in the next few days.
User avatar
714snoopy
Level 1
Level 1
 
Posts: 13
Joined: Wed Dec 02, 2009 7:51 pm

Re: File Sharing

Postby altair4 on Thu Dec 10, 2009 4:49 pm

I understand completely - I don't know if I'd do it either.

I really need to do some research on this winbind thing as it comes up from time to time. I actually used it once and it broke an otherwise working network. If you look at the definition of winbind from samba:
Winbind provides three separate functions:

    Authentication of user credentials (via PAM). This makes it possible to log onto a UNIX/Linux system using user and group accounts from a Windows NT4 (including a Samba domain) or an Active Directory domain.

    Identity resolution (via NSS). This is the default when winbind is not used.

    Winbind maintains a database called winbind_idmap.tdb in which it stores mappings between UNIX UIDs, GIDs, and NT SIDs. This mapping is used only for users and groups that do not have a local UID/GID. It stores the UID/GID allocated from the idmap uid/gid range that it has mapped to the NT SID. If idmap backend has been specified as ldap:ldap://hostname[:389], then instead of using a local mapping, Winbind will obtain this information from the LDAP database.

Clearly this is an enterprise level service which is probably why it's not installed by default. Secondly, once you install it, it needs to be configured. Yet in the cases I've read recently it's merely installed. Maybe some kind of HowTo or Checklist should be created that ends up with the "winbind solution" is in order. You'll also get the "can't find server list" error if the windows firewall is blocking a specific set of ports or if NetBIOS over TCP isn't enabled in Windows :wink:

Anyway, I'm glad your network is working as it should.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 15
Level 15
 
Posts: 5515
Joined: Tue Feb 03, 2009 10:27 am

Linux Mint is funded by ads and donations.
 

Return to Other networking topics

Who is online

Users browsing this forum: No registered users and 7 guests