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

Notices


Reply
  Search this Thread
Old 05-21-2005, 10:30 AM   #1
Linux31
Member
 
Registered: Aug 2004
Posts: 296

Rep: Reputation: 30
Samba and FC4


Does anyone know if they will be fixing Samba (finally) in FC4? Everything worked so well under FC1 until they broke it in FC2.

Thanks.

============

"samba

Browsing of Windows shares (also known as SMB browsing) fails on Fedora Core 3 systems that have the standard firewall configured. This is most easily noticed in the failure of Nautilus to display shares. The failure is due to the firewall disrupting the broadcast mode of SMB browsing, which is Samba's default setting. There are two workarounds:

*

Configure a WINS server on the network, and set the "wins server" option in smb.conf to the address of the WINS server.
*

Disable the firewall"
 
Old 05-21-2005, 10:33 AM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
How about the obvious other option to fix it.... keep your firewall enabled but add some rules to let the samba ports through....
 
Old 05-24-2005, 05:46 AM   #3
Linux31
Member
 
Registered: Aug 2004
Posts: 296

Original Poster
Rep: Reputation: 30
Samba and FC4

I'm just a beginner with Linux. I wouldn't know how and I'm not especially keen on putting holes in the firewall since I wouldn't know what I'm doing.
 
Old 05-24-2005, 09:36 AM   #4
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
Code:
#!/bin/sh
#Setup the path to your iptables firewall.
IPTABLES=/sbin/iptables

#Allow incoming Samba connetions
${IPTABLES} -A INPUT -p tcp --dport netbios-ssn -j ACCEPT
${IPTABLES} -A INPUT -p tcp --dport microsoft-ds -j ACCEPT
${IPTABLES} -A INPUT -p udp --dport netbios-ns -j ACCEPT
${IPTABLES} -A INPUT -p udp --dport netbios-dgm -j ACCEPT
Try running the above script and see if that fixes your problem. Your going to have to run it as root, and make sure to set IPTABLES= to the path to your iptables executable on your system.
 
Old 05-28-2005, 01:53 PM   #5
Linux31
Member
 
Registered: Aug 2004
Posts: 296

Original Poster
Rep: Reputation: 30
Thanks for the help. I'll give it a try.
 
Old 06-16-2005, 10:39 AM   #6
ChrisRC
LQ Newbie
 
Registered: Jun 2005
Posts: 2

Rep: Reputation: 0
Lightbulb

Hi!

I just downloaded and installed FC4 (6-14-2005).
I thought I'd share how I got Samba to work.

By the way, my problem was not Samba. It works just fine.
My problem was misunderstanding SELinux.

In a nutshell, I did three things:

1) Opened the firewall for Windows SMB, et al.
2) Relaxed SELinux security.
3) Configured and started Samba.

If you're using Gnome, you can find the firewall and SELinux
configurations under "Desktop/System Setings." Look to
SELinux configuration to relax the Samba-related stuff.
Look to the Firewall configuration to open ports for Samba
with this:

137:udp,137:tcp,139:udp,139:tcp,445:udp,445:tcp

Alternatively, just add the lines to /etc/sysconfig/iptables
with this:

-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 137 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 139 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 445 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT

The SELinux stuff is pretty obvious in the GUI, and I haven't yet checked
out the configuration files on the filesystem.

Then, just configure Samba however you normally do it.
Because the firewall is letting everything in, you might want to specify
the allowed hosts in smb.conf, something like this:

hosts allow = 192.168. 127.

Christopher
 
Old 06-27-2005, 03:14 PM   #7
froggo
LQ Newbie
 
Registered: May 2005
Posts: 28

Rep: Reputation: 15
hey i'm having a problem with samba, when i enter the username and password the prompt keeps coming back up and i am entering the correct username and password i'm doing everything i normally do for the previous versions of fedora but it is just not logging in
 
Old 06-27-2005, 04:02 PM   #8
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
froggo: Provided you have the proper “holes” in your firewall, the login problem you are describing often has to do with the target folder’s ownership and permission settings.

If the samba client (i.e., you) is the folder’s owner and you don’t want to share the folder, set permission to 700. Otherwise, set the permission to 777 and any valid samba client with login rights for the folder can view/edit the folder’s contents. Likewise, any file you want to access needs to have similar ownership/permission settings. To change these settings globally for the folder, look at:

man chown
man chgrp
man chmod

Examples:

chown -R owner_name /home/samba/folder
chgrp -R group_name /home/samba/folder
chmod -R 777 /home/samba/folder

Be sure to read the man pages before you use these commands, as a mistake can be very difficult to correct (e.g. “chmod -R 777 /” or "chown -R user_name /" #PS: Absolutely do not run these commands).

Last edited by WhatsHisName; 06-27-2005 at 04:08 PM.
 
Old 06-27-2005, 08:53 PM   #9
ChrisRC
LQ Newbie
 
Registered: Jun 2005
Posts: 2

Rep: Reputation: 0
Exclamation

Also...

If you have SELinux installed, and have not relaxed the SELinux security settings,
then you will see "the same thing." You can see if this is what is happening by
taking a look at the log files in /var/log/samba. SELinux somehow convinces Samba
that the share's filesystem directory is not valid directory. All the Samba client knows
is that things didn't work out.

Try relaxing the SELinux settings if this is happening.



Chris
 
Old 07-06-2005, 09:36 PM   #10
Jake.E
LQ Newbie
 
Registered: Jul 2005
Distribution: Suse, FC, RHEL
Posts: 2

Rep: Reputation: 0
Gnome Samba access broke with FC4

I had a working Samba share setup in Gnome (Places-->Connect to server, Nautilus, etc) using my Fedora laptop to access my home server. After installing FC4, it's broken: I always get "You do not have the permissions necessary to view the contents of ...." when trying to open my home directory on the server. I can access it using smbclient from the laptop, or mount it via "mount -t smbfs...." (as root on the laptop), just can't get to it with the GUI. I never get prompted for a Samba password, nor for the Gnome keyring password. Probably simple, but it's eluding me.
 
Old 09-24-2005, 12:43 PM   #11
James_Ecker
LQ Newbie
 
Registered: Mar 2004
Posts: 9

Rep: Reputation: 0
You need to set the context of the smbpasswd and secrets.tdb files to samba_secrets_t and add samba_enable_home_dirs=1 to the booleans.local file. These changes plus the changes to the iptables will allow the smb service to start and users to connect to their home directories.
 
Old 09-24-2005, 01:56 PM   #12
Jake.E
LQ Newbie
 
Registered: Jul 2005
Distribution: Suse, FC, RHEL
Posts: 2

Rep: Reputation: 0
Thanks for your interest. As I indicated, the shares are usable with the command line tools, just not with Gnome, so it's not likely to be file permissions or network. Anyway, that looks like Selinux stuff, and I have:
SELINUX=disabled
 
Old 10-14-2005, 12:43 PM   #13
urilabob
LQ Newbie
 
Registered: Oct 2005
Posts: 1

Rep: Reputation: 0
FC4 and SAMBA 3.0.2

James Ecker said:

> Distribution: You need to set the context of the smbpasswd and secrets.tdb files to samba_secrets_t and add
> samba_enable_home_dirs=1 to the booleans.local file. These changes plus the changes to the iptables will allow
> the smb service to start and users to connect to their home directories.

This problem is going to bite again as FC4 users like me upgrade to the new (3.0.2) distribution - installing it from the rpm seems to mess up the selinux setups, even if they were OK before. James' fixes seem to solve the problem. To save time for others, you may find it useful to know that smbpasswd and secrets.tdb are in ,/etc/samba, and booleans.local is in /etc/selinux/targeted (at least in FC4)
 
Old 12-29-2005, 11:39 AM   #14
Hirszu
Member
 
Registered: Mar 2005
Distribution: Ubuntu 7.10
Posts: 40

Rep: Reputation: 15
Must I something do in the SELinux configuration, if I dibabled it in the bott command with "selinux=0"?
 
  


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
samba FC4 Visko Fedora 2 10-23-2005 08:16 AM
FC4 + Samba. Can anyone help? tenraek Fedora 1 10-15-2005 01:56 PM
Samba and FC4 - Helpful Link Linux31 Fedora 1 09-23-2005 03:47 AM
noob Samba on FC4 Ray4389 Linux - Networking 7 08-04-2005 12:40 PM
anyone got samba working in FC4? hlslaughter Linux - Networking 4 06-21-2005 11:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora > Fedora - Installation

All times are GMT -5. The time now is 05:20 AM.

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