LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-11-2014, 09:09 AM   #1
jl2035
LQ Newbie
 
Registered: Dec 2012
Posts: 14

Rep: Reputation: Disabled
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!
 
Old 04-11-2014, 09:23 AM   #2
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326

Rep: Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920
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.
 
Old 04-11-2014, 10:18 AM   #3
jl2035
LQ Newbie
 
Registered: Dec 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
that explains a lot.. thanks. honestly i didn't imagine the situation is that bad.
 
Old 04-12-2014, 05:07 AM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by jl2035 View Post
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?
 
Old 04-12-2014, 06:45 AM   #5
jl2035
LQ Newbie
 
Registered: Dec 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
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.
 
Old 05-06-2014, 07:30 AM   #6
jl2035
LQ Newbie
 
Registered: Dec 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
If anybody is interested I set up the stack question: http://unix.stackexchange.com/questi...ba-not-working
 
Old 05-06-2014, 08:51 AM   #7
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: RHEL9.4
Posts: 735

Rep: Reputation: 154Reputation: 154
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
 
Old 05-06-2014, 09:05 AM   #8
jl2035
LQ Newbie
 
Registered: Dec 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
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.
 
Old 05-06-2014, 05:29 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,358

Rep: Reputation: 6149Reputation: 6149Reputation: 6149Reputation: 6149Reputation: 6149Reputation: 6149Reputation: 6149Reputation: 6149Reputation: 6149Reputation: 6149Reputation: 6149
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?
 
Old 05-06-2014, 06:04 PM   #10
jl2035
LQ Newbie
 
Registered: Dec 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
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 View Post
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.
 
Old 05-06-2014, 06:57 PM   #11
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,358

Rep: Reputation: 6149Reputation: 6149Reputation: 6149Reputation: 6149Reputation: 6149Reputation: 6149Reputation: 6149Reputation: 6149Reputation: 6149Reputation: 6149Reputation: 6149
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)
 
Old 05-06-2014, 09:31 PM   #12
frankbell
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
Blog Entries: 28

Rep: Reputation: 6248Reputation: 6248Reputation: 6248Reputation: 6248Reputation: 6248Reputation: 6248Reputation: 6248Reputation: 6248Reputation: 6248Reputation: 6248Reputation: 6248
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.
 
Old 05-07-2014, 12:26 AM   #13
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: RHEL9.4
Posts: 735

Rep: Reputation: 154Reputation: 154
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.
 
Old 05-07-2014, 09:34 PM   #14
frankbell
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
Blog Entries: 28

Rep: Reputation: 6248Reputation: 6248Reputation: 6248Reputation: 6248Reputation: 6248Reputation: 6248Reputation: 6248Reputation: 6248Reputation: 6248Reputation: 6248Reputation: 6248
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.
 
Old 05-08-2014, 07:06 PM   #15
jl2035
LQ Newbie
 
Registered: Dec 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
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?
 
  


Reply

Tags
samba


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Samba Headache: Guest works, but authenticated users don's xmrkite Linux - Software 1 07-26-2012 03:15 PM
[SOLVED] sed: alone [ /pattern/!d ] works; alone [ s ] works; together =don't work klenot Programming 7 10-23-2010 10:45 AM
Samba - don't display shares if you don't have permissions? kailun Linux - Server 3 05-07-2007 08:00 PM
Help! Don't now what's wrong...MPI ArthurHuang Programming 1 01-10-2007 04:43 PM
Installed the wrong SAMBA packages.Now samba doesn't start Terrence Hinds Linux - Networking 3 10-11-2004 04:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:48 PM.

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