LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 01-06-2011, 12:57 PM   #1
jonnie
LQ Newbie
 
Registered: Jan 2011
Posts: 15

Rep: Reputation: 0
Exclamation Setting up a Samba share, troubleshooting


Hi, I want to share some files on my Linux machine (Fedora 14) with the Windows machines on the local network. I'm trying to do that with a samba server... facing some troubles there.
I've installed the samba package and also swat, and I managed to get both running somehow. The samba server is configured for guests access, since setting up smb users is too much trouble at that early stage.

Now I can (sitting on the same machine) list my directories by:
Code:
smbclient -L localhost -U%
Domain=[FG_673] OS=[Unix] Server=[Samba 3.5.6-71.fc14]

	Sharename       Type      Comment
	---------       ----      -------
	IPC$            IPC       IPC Service (SambaServer)
	Musik           Disk      
Domain=[FG_673] OS=[Unix] Server=[Samba 3.5.6-71.fc14]

	Server               Comment
	---------            -------
	BANANE               Samba Server Version 3.5.6-71.fc14

	Workgroup            Master
	---------            -------
	FG_673               BANANE
...but if I try to connect to the shown share ("Musik") it gives an error:
Code:
smbclient //localhost/Musik -U%
Domain=[FG_673] OS=[Unix] Server=[Samba 3.5.6-71.fc14]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME
This is my smb.conf file, as created by swat:

Code:
# Samba config file created using SWAT
# from UNKNOWN (127.0.0.1)
# Date: 2011/01/06 19:48:56

[global]
	workgroup = FG_673
	server string = SambaServer
	interfaces = lo, eth0
	auth methods = guest
	log file = /var/log/samba/log.%m
	max log size = 50
	guest ok = Yes
	hosts allow = 127., 192.168.1.
	cups options = raw

[printers]
	comment = All Printers
	path = /var/spool/samba
	guest ok = No
	printable = Yes
	browseable = No

[Musik]
	path = /data/Musik
Can someone help me troubleshooting? Thanks in advance
 
Old 01-06-2011, 01:08 PM   #2
linuxunix
Member
 
Registered: Mar 2010
Location: California
Distribution: Slackware
Posts: 235

Rep: Reputation: 18
Please refer this.

Last edited by linuxunix; 01-06-2011 at 01:31 PM.
 
Old 01-07-2011, 08:05 AM   #3
jonnie
LQ Newbie
 
Registered: Jan 2011
Posts: 15

Original Poster
Rep: Reputation: 0
Didn't help, since this tutorial only uses smbclient -L to list the shares of the server (which is also working for me), but not the actual connect command smbclient //localhost/Musik -U% that should also work.

I tried with the official diagnosis manual: The Samba Checklist and I'm stuck at point 7 there. There's no help for the NT_STATUS_BAD_NETWORK_NAME error there.

Some more details:
- When I run
Code:
smbclient -I 127.0.0.1 -U% \\\\Musik\\
then no NT_STATUS_BAD_NETWORK_NAME error occurs; instead nothing happens, I also don't get the smb> prompt, the command just finishes without any output.
- I can see my samba server BANANE in my file explorer on network:/// and also on smb://fg_673/ and when I open it, I see the shares (homes and Musik); but when I try to open the folders, it gives an error message saying it can't mount the windows share.

Where and how can I start searching for the reason of this behavior? Thanks so far
 
Old 01-07-2011, 10:38 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,969

Rep: Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752
Try:
Code:
[Musik]
   path = /data/Musik
   writable = yes
   browseable = yes
   public = yes
   guest ok = yes
Make sure the permissions for /data/Musik are set R/W for all. It should be -U username not -U%
 
Old 01-09-2011, 05:00 AM   #5
jonnie
LQ Newbie
 
Registered: Jan 2011
Posts: 15

Original Poster
Rep: Reputation: 0
Well, I guess something was screwed up with my system... set up Fedora totally new, and now samba is working

Maybe it was some SELinux issue... this time, I followed all the SELinux instructions written in the initial smb.conf file, and set all the contexts of my shares to samba_share_t. On the other side, on the old system I was testing with SELinux turned OFF, so that can't really be the reason for that behavior.
Anyway I'm tired of finding that strange error, the new system works and that's fine.

-U% is for anonymous login, it's basically -Uusername%password, just giving neither of them.

Thanks for all your support.
 
  


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
Installing and setting Samba to share with a Win PC. glore2002 Slackware 6 06-23-2008 07:02 PM
Samba: setting specific directory masks in a single share lsgko Linux - Software 0 01-28-2008 12:27 PM
setting permissions for samba share eagle63 Linux - Newbie 2 12-23-2005 08:53 PM
Setting up samba to share files and printer linuxmandrake Linux - Software 9 10-14-2005 12:31 PM
I need help setting samba share permissions. trilect Linux - Software 10 08-24-2004 07:56 AM


All times are GMT -5. The time now is 11:48 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration