LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices



Reply
 
Search this Thread
Old 09-20-2012, 12:36 PM   #1
sljunkie
Member
 
Registered: Nov 2008
Location: Brazil
Distribution: Arch Linux/Fedora
Posts: 95

Rep: Reputation: 18
Nautilus and samba


Ok I installed Fedora 17 and I'm just getting used to it, but I have a working samba server running in my LAN and: "smbclient //<host>/<share>" works like a charm in the console but in Nautilus I get to see my workgroup, but when I click on it I get this message:

"Unable to mount location"
"Failed to retrieve share list from server"

Even calling the specific share in nautilus from the console works: "nautilus smb://<host>/<share>"

What could be wrong?



EDIT: I somehow got Nautilus to work, I reinstalled samba-common to get the original smb.conf and then worked my way out from it. At first it didn't work, but after some idle time I got my 'guest ok' share to show up in Nautilus.

POST EDIT: Now I'm struggling to see the Windows 7 shares from my Fedora machine. I followed this http://wiki.samba.org/index.php/Windows7 link but am yet to see results... I am able to see my Samba shares from the Windows machine, tough.

Last edited by sljunkie; 09-20-2012 at 07:30 PM.
 
Old 09-20-2012, 09:34 PM   #2
frankbell
Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Mageia, Mint
Posts: 8,245

Rep: Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557
I have encountered this error when connecting from my Win 7 computer to my Debian file server.

My workaround is usually just to use the IP address, since it's a small home network and my file server has a static IP. I never bothered to troubleshoot it since the IP address works.

Are you running a Samba domain? The link at the end of your post is about joining Windows into a Samba domain. That's a different world from simple sharing.

In a simple home or office network, it's usually sufficient to share the Windows directory with simple sharing (not that Homegroup thing, which works only with Windows machines). Sometimes a reboot or two helps.
 
Old 09-21-2012, 12:46 AM   #3
sljunkie
Member
 
Registered: Nov 2008
Location: Brazil
Distribution: Arch Linux/Fedora
Posts: 95

Original Poster
Rep: Reputation: 18
No, I just want simple sharing. So much that if I launch 'smbclient -L //<ip_of_Windows_machine>/<share> -U<Windows_user_name>' I can view the files. However, the shares aren't displayed when I launch Nautilus or issue the 'smbtree' command - in both cases all I get is the name of the Windows 7 box. Do I have to implement a Samba domain for this?
 
Old 09-21-2012, 09:14 PM   #4
frankbell
Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Mageia, Mint
Posts: 8,245

Rep: Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557
You shouldn't have to create a samba domain, but you do need to configure your /etc/samba/smb.conf file to allow sharing and configure the directories as shared; the latter step is separate from designating the shares in Samba. You also need to be running the samba server daemon (smbd) and the Samba password file (/etc/samba/passwd) needs to be set up properly.

Slackware comes with smbd installed; I can't remember about Salix, but you can do this command in a terminal to determine whether it's running. If it is running, you will get results similar to those shown:

Code:
~$ ps -A | grep smbd
 2402 ?        00:00:00 smbd
 2416 ?        00:00:00 smbd
Here's a good article on setting up Samba on Slack: http://www.basicconfig.com/linux_samba_server_setup

The Samba reference that I found most useful was Samba by Example.

To check the sharing on your Linux shares, open your file manager, highlight the share with the mouse, right-click, and select properties from the pop-up. Check the permissions (the permissions dialog may be in the pop-up or that may be in the properties display). To change the permissions, you should be root.

Here's a portion of my Samba config files, which works very nicely for my own use.

Code:
$ cat /etc/samba/smb.conf
# Global parameters

[global]
workgroup = workgroup
security = share
encrypt password = yes
smb passwd file = /etc/samba/smbpasswd
show add printer wizard = No
wins support = no

[sharefiles]
path = /home/[username]/sharefiles
guest ok = yes
read only = no
available = yes
browsable = yes
public = yes
writable = yes
Hope this helps get you started.

As a side note, when I first decided to set up sharing, it took me several stabs to get it right. It's not all that complicated once you know how, but there are several pieces that all must fit.

When I finally did get it working, I saved my smb.conf file in multiple places; what I've excerpted above is pretty much from that file. When I set up sharing on a new computer, I pretty much recycle that file and adjust it as needed.

Last edited by frankbell; 09-21-2012 at 09:16 PM.
 
Old 09-21-2012, 09:27 PM   #5
sljunkie
Member
 
Registered: Nov 2008
Location: Brazil
Distribution: Arch Linux/Fedora
Posts: 95

Original Poster
Rep: Reputation: 18
I used to have in my Slackware 13.37 installation the following file:

Code:
[global]
	workgroup = WORKGROUP
	netbios name = GAUSS
	server string = Samba Server
	security = USER
	hosts allow = 192.168.1.0/24, 127.0.0.1
	hosts deny = 0.0.0.0/0
	lanman auth = Yes
	client lanman auth = Yes
	load printers = Yes
	printing = cups
	printcap name = cups
	max log size = 50
	encrypt passwords = Yes

[tmp]
	comment = Temporary file space
	path = /tmp
	browseable = Yes
	writeable = Yes
	guest ok = Yes

[printers]
	comment = All Printers
	path = /var/spool/samba
	browseable = No
	writeable = No
	printable = Yes
	guest ok = Yes
	printer admin = root
And it worked (almost) perfectly, IE I could see my samba shares trough the file manages and via smbtree, but could not browse the Windows 7 shares. This file doesn't work in Fedora 17, I don't know why...
 
Old 09-21-2012, 10:05 PM   #6
frankbell
Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Mageia, Mint
Posts: 8,245

Rep: Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557
I must have missed something. My apologies.

The smb.conf file is irrelevant to browsing shares on Windows computers.

How is the Windows share configured?

Last edited by frankbell; 09-21-2012 at 10:21 PM.
 
Old 09-22-2012, 02:46 PM   #7
sljunkie
Member
 
Registered: Nov 2008
Location: Brazil
Distribution: Arch Linux/Fedora
Posts: 95

Original Poster
Rep: Reputation: 18
Unfortunately, my Windows machine just crashed. How wonderful. Just a minute ago this machine *could* read the /tmp directory and recognize the printer but when I tried to print anything the file got stuck in the Windows printing queue. By the way, my firewall is set to allow inbound cups, smb and nmb calls.

Anyway, here's my smb.conf:
Code:
#======================= Global Settings =====================================

[global]
	workgroup = WORKGROUP
	server string = Samba Server

	netbios name = GAUSS

	interfaces = lo eth0 127.0.0.1 192.168.1.0/24
        hosts deny = 0.0.0.0/0
	hosts allow = 127.0.0.1 192.168.1.0/2

	log file = /var/log/samba/log.%m
	max log size = 50

	security = user
	passdb backend = tdbsam

#============================ Share Definitions ==============================

[homes]
	comment = Home Directories
	browseable = no
	guest ok = no
	writable = yes
	valid users = %S

[printers]
	comment = All Printers
	path = /var/spool/samba
	browseable = no
	guest ok = yes
	writable = no
	printable = yes

[tmp]
	comment = Temporary Files
	path = /tmp
	public = yes
	writable = yes
	printable = no
	guest ok = yes
 
Old 09-25-2012, 02:23 PM   #8
sljunkie
Member
 
Registered: Nov 2008
Location: Brazil
Distribution: Arch Linux/Fedora
Posts: 95

Original Poster
Rep: Reputation: 18
Ok I found out that SAMBA isn't configured to be a client by default, so I added:

Code:
client NTLMv2 auth = yes
in my [global] section. I am able to view my shares on my Samba Server as long as I log in with my password in the Windows 7 machine but... I don't want to do that. I want to enable some shares and my printer logging in as 'guest' in Windows 7 but I don't know how! Also, I tried to share my home directories but:

Code:
setsebool -P samba_enable_home_dirs on
Simply hanged the shell and did nothing!



EDIT: For some reason, I was able to browse my /home directory from the Windows machine... it just takes a (long) while!

Last edited by sljunkie; 09-25-2012 at 04:23 PM.
 
Old 09-25-2012, 08:05 PM   #9
sljunkie
Member
 
Registered: Nov 2008
Location: Brazil
Distribution: Arch Linux/Fedora
Posts: 95

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by frankbell View Post
I must have missed something. My apologies.

The smb.conf file is irrelevant to browsing shares on Windows computers.

How is the Windows share configured?
I think I did things wrong with the Windows computer... when I click on my Samba Server, it asks for a password in a domain whose name is the name of the Windows 7 machine... now I cannot login without having a smbpasswd account - but I heard this has become obsolete with the Samba version shipped in Fedora 17.
 
Old 09-25-2012, 09:33 PM   #10
frankbell
Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Mageia, Mint
Posts: 8,245

Rep: Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557
I always create a user account on my Linux machine and in smbpasswd for users I expect to be connecting to a Samba share, but it's just my home network and there are seldom more than two of us.

I can't speak to Fedora 17. I'm running Slackware and Debian, so it's unlikely that I'm on the same bleeding edge as Fedora.

Here's a link to the Fedora docs. Maybe they will help:
http://docs.fedoraproject.org/en-US/...t_Servers.html

Wish I could help more.
 
Old 09-27-2012, 12:28 AM   #11
sljunkie
Member
 
Registered: Nov 2008
Location: Brazil
Distribution: Arch Linux/Fedora
Posts: 95

Original Poster
Rep: Reputation: 18
Ok I created a smbpasswd (empty) for 'nobody' and added the line:

Code:
invalid users = nobody
To my [homes] share. This way I get guest functionality with NTLMv2 authentication, but it's still not 'right', I suppose...

EDIT: Read the documentation, n00b:

"As mentioned earlier, you can configure a share using guest ok = yes to allow access to guest users. This works only when using share-level security."

And there I go, changed my security level to 'share' and it worked.

BUT I'm still unable to see shares from my Windows 7.

Last edited by sljunkie; 09-27-2012 at 02:35 PM.
 
  


Reply


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
nautilus samba problem the1sephiroth Linux - Desktop 3 12-27-2010 09:53 PM
Samba + nautilus gejr Linux - Software 0 05-02-2007 04:06 PM
Nautilus Samba problem yotamk Debian 10 02-25-2006 01:46 AM
Samba and Nautilus vwal_13 Slackware 2 04-13-2004 05:04 AM
nautilus not working with samba kefen Linux - Networking 1 03-13-2004 11:33 AM


All times are GMT -5. The time now is 08:35 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration