LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-22-2012, 12:42 AM   #1
dragonix
Member
 
Registered: Nov 2012
Location: Belgium
Distribution: Ubuntu 12.04
Posts: 69
Blog Entries: 6

Rep: Reputation: 1
[SAMBA] Cannot find my shared folder


Hi all

The whole idea is to share a folder (duh..) within a network and if that is working, then I want to extend it over the internet, with the needed security ofcourse.

I installed Samba on my Ubuntu 12.04, but I cannot find my shared folder..
Maybe nice to know, that I'm doing this on the network from my work (so not my home network, didn't had the time to check it yesterday)

Anyway, the steps I took, were

Code:
$ sudo su
$ apt-get install samba samba-common
$ nano /etc/samba/smb.conf
In the config file, I added/edited the following
Code:
[Global]
security = user
workgroup = wokrgroup
server string = Samba server %v
netbios name = ubuntu
map to guest = bad user
dns proxy = no

[share]
path = /samba/share
browsable = yes
writable = yes
guest ok = yes
read only = no
I want to get access to this file with my Windows 7 laptop (the samba server, which is also a laptop and the W7 laptop are 2 separate physical devices)
So, when I use RUN and enter \\ubuntu, it cannot find the server..

What did I do wrong?

Dragonix
 
Old 11-22-2012, 02:51 AM   #2
Lexus45
Member
 
Registered: Jan 2010
Distribution: Debian, Centos, Ubuntu, Slackware
Posts: 361
Blog Entries: 3

Rep: Reputation: 48
The problem seems to be not in Samba but in name resolving.
Are you sure, your Win PC knows the IP address of the PC with the hostname 'ubuntu' ?
Add the appropriate entry to your DNS server (if you use one) or at least an entry to Windows' hosts file.

The other way is just to use the IP address instead of hostname, while connecting to your Samba PC, e.g. on Windows - \\192.168.0.4

--
You may also chech your Samba config file with 'testparm' command (on Ubuntu). And also look at your own shares with 'smbclient -L localhost' command.

Last edited by Lexus45; 11-22-2012 at 02:54 AM.
 
Old 11-22-2012, 03:00 AM   #3
dragonix
Member
 
Registered: Nov 2012
Location: Belgium
Distribution: Ubuntu 12.04
Posts: 69

Original Poster
Blog Entries: 6

Rep: Reputation: 1
Um, not sure if he knows that IP address..
When I do ifconfig on my ubuntu laptop, i have 4 different ip addresses.
Which one do I need to use and in what way?

- lo (loopback, so no need for that one)
- eth0 (no cable, so no luck here)
- tunsnx (I believe the IP address for my VPN connection or something?)
- wlan0 (since it's connected over wireless, this is my best bet)

So, assume that the IP address of wlan0 -> 192.168.0.22
How can I gain access with this IP address on my WIN laptop?
I did it with run (\\192.168.0.22\) but appears to be not successfull
and in firefox (http://192.169.0.22/) but also no luck..

Thanks for your effort btw!
 
Old 11-22-2012, 03:06 AM   #4
Lexus45
Member
 
Registered: Jan 2010
Distribution: Debian, Centos, Ubuntu, Slackware
Posts: 361
Blog Entries: 3

Rep: Reputation: 48
About interfaces:
you must know exactly in what network is your Samba PC located, and the Win PC must be in the same subnet. Compare Windows' IP addresses with the Ubuntu's IP addresses. They must be equal (not guaranteed if to be honest). Just try connecting to all of them, except loopback, whe connecting from Windows.

About Firefox:
you can not connect Samba server via HTTP protocol , like you can not drive your car like a plane.
Samba uses the very other TCP protocol than HTTP. It's very different things.

So, first of all you have to be sure that your PCs see each other. When it will be so, you can configure any services you want.

Last edited by Lexus45; 11-22-2012 at 03:07 AM.
 
Old 11-22-2012, 03:16 AM   #5
dragonix
Member
 
Registered: Nov 2012
Location: Belgium
Distribution: Ubuntu 12.04
Posts: 69

Original Poster
Blog Entries: 6

Rep: Reputation: 1
Quote:
Originally Posted by Lexus45 View Post
About interfaces:
you must know exactly in what network is your Samba PC located, and the Win PC must be in the same subnet. Compare Windows' IP addresses with the Ubuntu's IP addresses. They must be equal (not guaranteed if to be honest). Just try connecting to all of them, except loopback, whe connecting from Windows.

About Firefox:
you can not connect Samba server via HTTP protocol , like you can not drive your car like a plane.
Samba uses the very other TCP protocol than HTTP. It's very different things.

So, first of all you have to be sure that your PCs see each other. When it will be so, you can configure any services you want.
Good point about the devices should be in the same network.
Subnetmask is 255.255.240.0, so the range goes from 192.168.0.1 to 192.168.15.254, and then 192.168.16.1 to 192.168.30.254, and so on ... (broadcast address and network address left out)
If I'm not mistaking? (it has been a while )

If so, then they are in the same subnet..

Would it make sense that I copy the /etc/samba/smb.conf file here? So you can take a look how everything is configured?
 
Old 11-22-2012, 05:36 AM   #6
Adol
Member
 
Registered: Feb 2011
Location: Osaka, Japan
Distribution: Gentoo, Opensuse
Posts: 271

Rep: Reputation: 6
Just a quick thought.

Did you restart Samba(its easier to just restart both computers)?

Also, make sure that the workgroups are the same and that a firewall is not blocking your samba server. If you have an autoconfigured firewall it will usually block it unless you specify it not to.

If its on the same workgroup and not blocked by a firewall, after a restart, windows should detect it.
 
Old 11-22-2012, 05:39 AM   #7
dragonix
Member
 
Registered: Nov 2012
Location: Belgium
Distribution: Ubuntu 12.04
Posts: 69

Original Poster
Blog Entries: 6

Rep: Reputation: 1
I have restarted the samba server
Code:
sudo restart smbd
sudo restart nmbd
But I didn't restart the WIN pc.

Like I said in my first post, at this moment I'm on the network of my company.. So I assume the FW of this network is blocking it.
Just wanted to make sure if that was the case.

Can I verify this, by perhaps pinging to a IP address or whatever?

Thanks for the tips btw
 
Old 11-22-2012, 09:23 AM   #8
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
If your windows and ubuntu machine are on the same network then you should be able to access the shares

So basically you are not on VPN and you have not connected LAN cable and you are on Wireless which is on same network as on Windows 7. If all these are correct then give a check to firewall and selinux on ubuntu.

Once you restart your smb and nmb services check the log file for any clue. Disable your firewall or create new rules for firewall

Here I have written the iptables rule for RedHat
IPtables rules for Samba server

I am not so good with selinux rules so you can hit a google search for how to allow samba to pass through selinux or you can disable it and do a restart to make the changes affect
 
Old 11-23-2012, 12:40 AM   #9
dragonix
Member
 
Registered: Nov 2012
Location: Belgium
Distribution: Ubuntu 12.04
Posts: 69

Original Poster
Blog Entries: 6

Rep: Reputation: 1
I will have a look
Thanks!

Still haven't got the time to check it at home.. I believe it will work there (hopefully..)
I will keep this posted!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba shared folder size CitizenjaQ Linux - Server 1 09-02-2008 04:44 PM
Samba shared folder klmn1 Linux - Server 5 08-20-2008 04:22 AM
Samba shared folder configuration Fubuki Linux - Software 0 08-13-2008 04:54 AM
winblows ask for pass to shared samba folder? tommytomthms5 Linux - Newbie 16 09-09-2007 05:00 AM
I can see SAMBA shared folder in XP but can't access it vishivishi Linux - Networking 6 08-30-2006 01:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration