Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
04-11-2014, 09:09 AM
|
#1
|
LQ Newbie
Registered: Dec 2012
Posts: 14
Rep:
|
I don't know what's wrong with me, but samba never works here
Can somebody please explain samba to me. For me this is the biggest pain that linux has. Maybe I'm such a noob, but file sharing doesn't work for me in 90% of the time...no matter which distro I use or what tutorial I read through. I'm talking about 6-7 years era. I don't remmember if I ever succeeded in successfully setting this up!
Why is this such a big deal for linux?! User should never care about this. When you install a fresh copy of let's say ubuntu, file sharing should just work!
|
|
|
04-11-2014, 09:23 AM
|
#2
|
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326
|
well smb is a microsoft protocol where they dont share the source code. i think its a miracle that linux developers were able to hack it so that the samba-server could fool windows clients into thinking it was a windows file server and connect to it...
and that the samba-client could fool windows file servers into believing they are windows-pc's and allow them to share.
(its like complaining car company x's muffler doesnt fit on car company y; therefore car company y sux).
most people use nfs for file sharing when windows isnt involved. i like to use sshfs.
|
|
|
04-11-2014, 10:18 AM
|
#3
|
LQ Newbie
Registered: Dec 2012
Posts: 14
Original Poster
Rep:
|
that explains a lot.. thanks. honestly i didn't imagine the situation is that bad.
|
|
|
04-12-2014, 05:07 AM
|
#4
|
LQ Addict
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316
|
Quote:
Originally Posted by jl2035
that explains a lot.. thanks. honestly i didn't imagine the situation is that bad.
|
I have to say, it works for me, mostly. It seems to me it's easier to connect Windows PCs with Samba that with other Windows PCs. Samba is fairly mature; most problems are due to misunderstanding Microsoft networking.
If you really want an answer - what are the symptoms?
|
|
|
04-12-2014, 06:45 AM
|
#5
|
LQ Newbie
Registered: Dec 2012
Posts: 14
Original Poster
Rep:
|
I install samba. Than I try to browse the network. I can't see any windows or linux PCs. There's one folder "Windows network", which is empty.
|
|
|
05-06-2014, 08:51 AM
|
#7
|
Member
Registered: Sep 2004
Location: Japan
Distribution: RHEL9.4
Posts: 735
Rep:
|
Windows network being empty... sounds like you use linux to browse for smb shares.
As a path type
smb://ip-of-smbserver
See what that does
|
|
|
05-06-2014, 09:05 AM
|
#8
|
LQ Newbie
Registered: Dec 2012
Posts: 14
Original Poster
Rep:
|
Hm.. it says "Password required for 192.168.x.x" and you have to enter username, domain and password...which also doesn't make sense.
|
|
|
05-06-2014, 05:29 PM
|
#9
|
Moderator
Registered: Aug 2002
Posts: 26,358
|
Is 192.168.x.x running windows or linux?
Please list the linux distribution / versions and versions of windows.
Make sure that all the computers are configured with the same workgroup name.
Make sure that any computer running a firewall allows SMB traffic. Windows should do this automatically except if running a non MS firewall.
Have you added a samba user to your linux boxes?
|
|
|
05-06-2014, 06:04 PM
|
#10
|
LQ Newbie
Registered: Dec 2012
Posts: 14
Original Poster
Rep:
|
I'm using ElementaryOS Luna. Probably 10.04 LTS.
192.168.x.x is Windows 7. Other computers are mostly Windows 7 and one Ubuntu 14.04. Also one mac but don't care about that one. Ubuntu 14.04 can see windows shares.
Windows 7 boxes run a firewal like AVG, or Comodo I guess..
Quote:
Originally Posted by michaelk
Have you added a samba user to your linux boxes?
|
Shouldn't this be done automaticaly? And how do I do that corectly?
Last edited by jl2035; 05-06-2014 at 06:05 PM.
|
|
|
05-06-2014, 06:57 PM
|
#11
|
Moderator
Registered: Aug 2002
Posts: 26,358
|
Windows 7 will create default shares. Use your name and password that you use to log into the computer. If not visible in the file browser then it is probably due to the firewall.
To access other linux PCs via samba:
If samba is running you should see the computer name in the network places of the file browser. As previously stated make sure the firewall if running allows SMB traffic as well as confirming the workgroup names is the same. You will need to edit the /etc/samba/smb.conf file. Restart samba for any changes to be come effective.
You will need to add a samba user using the smbpasswd console command (you need to be root or use sudo). On the Ubuntu PC
sudo smbpasswd -a username (same as your regular linux user name)
|
|
|
05-06-2014, 09:31 PM
|
#12
|
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,671
|
A couple of thoughts.
When I first toyed with Samba eight or so years ago, it took me a while to get it working. On my Windows XP computer, I actually had to install netbui to get a connection, but I've had no such problem with my Win7 box.
The Windows shares need to be shared in their directory properties via what Windows (misleadingly) calls "simple sharing." If that "Windows homegroup" thingee is being used to share the directories, my experience has been that the shares can be seen only from other Windows boxes.
Also, if your Windows box is not set up to use a password at login, establish a password and make it required; for testing purposes, set up an account with the same username/pword as you are using on your Linux box and share a directory under that user's profile.
Last edited by frankbell; 05-06-2014 at 09:34 PM.
|
|
|
05-07-2014, 12:26 AM
|
#13
|
Member
Registered: Sep 2004
Location: Japan
Distribution: RHEL9.4
Posts: 735
Rep:
|
So ubuntu can see the shares, can that same ubuntu access, read and write to the shares without a username and password?
As frankbell said win7 is pretty good with the whole samba thing, then win8 it becomes a problem again. With win8 the only way i got it working is to add dns entries for the samba server.
Last edited by ericson007; 05-07-2014 at 12:30 AM.
|
|
|
05-07-2014, 09:34 PM
|
#14
|
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,671
|
I forgot this last night, but you can check whether and how the Windows shares are being seen with the smbclient command issued from the Linux machine. That could provide useful troubleshooting information.
Also check that the TCP ports are open both ways in the Windows and Linux firewalls.
Last edited by frankbell; 05-07-2014 at 09:55 PM.
|
|
|
05-08-2014, 07:06 PM
|
#15
|
LQ Newbie
Registered: Dec 2012
Posts: 14
Original Poster
Rep:
|
On Ubuntu I have to click "Connect to Server", and type: smb://192.168.x.x
and than I see the shares.
ElementaryOS has a different "Connect to Server" dialog, with an option to choose protocol. Like ssh, ftp, public ftp.. and one option is "Windows share", which I guess means smb. I tried to connect with and without smb:// prefix and both ways don't work. It's just stuck on "Connecting..".
How do I check if the TCP ports are open on Linux?
|
|
|
All times are GMT -5. The time now is 05:48 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|