Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 01-06-2011, 01:57 PM   #1
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:
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:
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:

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

	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

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

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

Rep: Reputation: 18
Please refer this.

Last edited by linuxunix; 01-06-2011 at 02:31 PM.
Old 01-07-2011, 09:05 AM   #3
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
smbclient -I -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, 11:38 AM   #4
Registered: Aug 2002
Posts: 16,490

Rep: Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959
   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, 06:00 AM   #5
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.



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

All times are GMT -5. The time now is 10:56 PM.

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