Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora Resources > Guides & Solutions (No Questions)
FedoraForum Search

Forgot Password? Join Us!

Guides & Solutions (No Questions) Post your guides here (No links to Blogs accepted). You can also append your comments/questions to a guide, but don't start a new thread to ask a question. Use another forum for that.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 3rd November 2008, 01:06 PM
fadzly Offline
Registered User
 
Join Date: Nov 2008
Posts: 1
Lightbulb Setting up Samba to share your Linux folders to Windows in Fedora 8

Hello everyone! This is my first post. And as a sign of gratitude towards the Linux community forums that has helped me with a lot through lots of forum, I thought I give it back through this how-to.

1. Try to get a static IP address for your Linux machine. It makes a WHOLE lot easier. In Linux
i. Click on System > Administration > Network
ii. I only have one ethernet card, which is eth0, so I click on that one and click Edit (from the top menu)
iii.Check on ‘Statically set IP addresses’ and enter all your IP stuff (address, subnet mask, default gateway address)

2. Samba should be installed by default in Fedora 8.
To fully access Samba, SELinux should either allow access for Samba (which I am NOT doing) or be fully turned off (my choice.)
Open the following file using your favourite text editor:
/etc/selinux/config

Look for the following line:
SELINUX=enforcing
Change to the following
SELINUX=disabled

After you have done that reboot your system.

3. Next, we have to open a few ports in your firewall so that clients can connect. Logging in as root, open a terminal window and type:

system-config-firewall-tui

You should see a blue screen with red buttons.

i. You must set Firewall as enabled.
ii. Click on ‘Customize’.
iii.From the next screen, Select Samba as a Trusted Service. You must also check that your Trusted Interface is the one you using for Samba
iv. Select OK once you are done.

4. Now we enable the automatic startup of the needed services, using the following commands in Terminal:
i. chkconfig smb on
ii.chkconfig nmb on

Once you are done, reboot your system

5. Now, we are going to edit the smb.conf file. Open etc/samba/smb.conf using your favourite text editor.
Copy the following into that file (you may want to make a backup of the original file first. And when you are copying, paste over everything.)

Fadzly’s smb.conf

[global]
workgroup = homegroup ;put your own workgroup name here
netbios name = samba ; this should be your own too
server string = Fadzly Samba Server
; hosts allow = 192.168.1
announce version = 5.0
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
passdb backend = tdbsam
security = user
null passwords = true
username map = /etc/samba/smbusers
smb passwd file = /etc/samba/smbpasswd
name resolve order = hosts wins bcast
wins support = yes
printing = CUPS
printcap name = CUPS
syslog = 1
syslog only = yes
; guest ok = no
; guest account = nobody

;[homes]
; comment = Home Directories
; read only = No
; browseable = No

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


[fadzlyhome]
path = /home/fadzly
valid users = fadzly
write list = fadzly
read only = No
available = yes
; The following hides all the dot files and hidden files
hide dot files = yes
veto files = /.?*/

[fadzly]
path = /mnt/linuxbkup/fadzly
valid users = fadzly
write list = fadzly
read only = No
available = yes

Save the file.

Points to note:

i. I did not share my home directories so I comment it
ii.The fadzly share is a share on another hard disk which I auto-mounted

6. Now we need to restart the samba service for the new smb.conf to kick in. use the following commands:

service smb restart
service nmb restart

7. Before we can actually connect to the Linux machine from your Windows machine, we need to make a few changes to your Windows Network Configuration.

i. Firstly open your Network Connections. Right click the connection that you use to connect to the web (active connection) and click on properties.
ii. General Tab > Find & click Internet Protocol (TCP/IP) > Properties …. next ….
iii.General Tab> Advanced button > WINS > ADD
iv. Under TCP/IP WINS server type in the local IP address of your Linux box.
For example : 192.165.12.101
v. Then check on the radio button > Enable NetBIOS over TCP/IP
vi. You will need to restart your computer first before the settings take into effect.

8. Finally, there are a few ways that you can access your Linux machine.

i. Mapping network drive (Permanent):
•Right click My Computer > Map Network Drive > Choose a letter for the drive.
•Under folder, type in the hostname/IP address and share folder
.e.g linuxcom\MyFiles (if you have WINS support) or
192.165.12.101\MyFiles

ii.Entering address on the Explorer bar (Temporary Access):
•Enter your hostname/IP address and share folder into the explorer bar.
e.g \\linuxcom\MyFiles or \\192.165.12.101\MyFiles

There you have it! A simple (but not 100% secure) way of sharing folders using Linux.
Reply With Quote
  #2  
Old 3rd November 2008, 09:12 PM
LBCoder Offline
Registered User
 
Join Date: Oct 2008
Posts: 221
I suggest sharing a subdirectory of your home instead of the whole thing. Reason being that giving windows access to the whole thing allows windows to damage anything. If you share a directory like /home/fadzly/winshare, then windows can only damage data in THAT directory.
Reply With Quote
  #3  
Old 17th September 2009, 11:44 PM
khaytsus Offline
Registered User
 
Join Date: Jan 2008
Posts: 17
linuxfirefox
Garbage, dumb, and uniformed. If you think you need to disable selinux you fail first thing.
Reply With Quote
  #4  
Old 18th September 2009, 12:53 AM
nix Offline
Registered User
 
Join Date: Jan 2009
Location: Florida, USA
Posts: 104
linuxfedorafirefox
What they are really saying is welcome to the forum - lmao! wth!
Reply With Quote
  #5  
Old 18th September 2009, 01:18 AM
khaytsus Offline
Registered User
 
Join Date: Jan 2008
Posts: 17
linuxfedorafirefox
Quote:
Originally Posted by nix View Post
What they are really saying is welcome to the forum - lmao! wth!
Bad advice should be labelled as such, and there's plenty of it to go around.
Reply With Quote
  #6  
Old 18th September 2009, 04:20 AM
psyklops Offline
Registered User
 
Join Date: Apr 2005
Posts: 346
linuxfedorafirefox
Quote:
Originally Posted by khaytsus View Post
Garbage, dumb, and uniformed. If you think you need to disable selinux you fail first thing.
Bit harsh don't you think?

It looks like he's just trying to setup a home network sharing with Fedora and Windows. I've never run SElinux since it was introduced (Fedora Core 2, I think??), but then again, I don't have to really worry about implementing US Dept. of Defence mandatory style access control policies
Reply With Quote
  #7  
Old 16th December 2009, 04:13 PM
jkgruet Offline
Registered User
 
Join Date: Dec 2009
Posts: 2
linuxfedorafirefox
If you know how to improve advice, do so

khaytsus, what you say may be true, but I noticed that you did not modify the guide to make it more useful. It remains unclear from your post whether the "disable selinux" section is unneeded and may be removed, or if it should be kept but with changes to the rest of the guide.
Reply With Quote
  #8  
Old 16th December 2009, 04:35 PM
khaytsus Offline
Registered User
 
Join Date: Jan 2008
Posts: 17
linuxfedorafirefox
Quote:
Originally Posted by jkgruet View Post
khaytsus, what you say may be true, but I noticed that you did not modify the guide to make it more useful. It remains unclear from your post whether the "disable selinux" section is unneeded and may be removed, or if it should be kept but with changes to the rest of the guide.
I think I was fairly clear about not needing to disable SElinux, but okay ;-)

So just to be clear, SElinux does not need to be disabled, but you DO have some configuration to make in order for Samba and SElinux to coexist. No fault of either, simply a matter of how SElinux works to ensure that the wrong/unintended files are not being shared. Same thing with http and other daemons as well I suspect.

Here's the proper information on how to ensure your files can be shared via Samba with SElinux enabled: http://fedoraproject.org/wiki/SELinux/samba

There's also http://danwalsh.livejournal.com/14195.html which has basically the same info, with some additional tidbits.
Reply With Quote
  #9  
Old 16th December 2009, 08:41 PM
jkgruet Offline
Registered User
 
Join Date: Dec 2009
Posts: 2
linuxfedorafirefox
khaytsus, thanks. The fedoraproject link pointed in the right direction. The SElinux in Fedora 12 (v.2.0.87-a.fc12) does not have some of the booleans noted in your fedoraproject.org/wiki link, but with a bit of exploring and use of system-configure-selinux, I was able to share a directory on my Fedora 12 system with my mandated Vista machine.

Thanks again.
Reply With Quote
  #10  
Old 21st May 2010, 02:26 PM
fedorajockey Offline
Registered User
 
Join Date: May 2010
Posts: 2
windows_xp_2003firefox
Cool Re: Setting up Samba to share your Linux folders to Windows in Fedora 8

Have you created a Samba username and password?

use the following:

'smbpasswd -a <username>'

And also make sure in your smb.conf file, where you have specified your directory there is a

'valid users = <smb_username> '
Reply With Quote
  #11  
Old 17th July 2010, 05:55 PM
tr1pl3x Offline
Registered User
 
Join Date: Jul 2010
Location: Philippines
Posts: 9
windows_xp_2003firefox
Re: Setting up Samba to share your Linux folders to Windows in Fedora 8

. Firstly open your Network Connections. Right click the connection that you use to connect to the web (active connection) and click on properties.
ii. General Tab > Find & click Internet Protocol (TCP/IP) > Properties …. next ….
iii.General Tab> Advanced button > WINS > ADD
iv. Under TCP/IP WINS server type in the local IP address of your Linux box.
For example : 192.165.12.101


why do you need to add WINS server on your client xp??
Reply With Quote
  #12  
Old 10th March 2013, 01:02 PM
rahamanbr Offline
Registered User
 
Join Date: Mar 2013
Location: Chittagong
Posts: 1
windows_xp_2003firefox
Re: Setting up Samba to share your Linux folders to Windows in Fedora 8

Nice Post hope it will be helpful
Reply With Quote
Reply

Tags
fedora 8, samba, smb.conf

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora 10 Unable to access to Windows Share Folders on the LAN. gaaurav_singh Servers & Networking 1 4th March 2009 03:00 PM
Fedora 9 - samba and windows share problem... jtsagara Using Fedora 14 15th September 2008 11:54 AM
Deleting folders/files from a samba share daviddoria Using Fedora 3 12th July 2008 04:05 AM
FC4 samba share folders laiseng Servers & Networking 2 20th October 2005 08:17 AM


Current GMT-time: 01:45 (Friday, 01-08-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat