FedoraForum.org - Fedora Support Forums and Community
Results 1 to 12 of 12
  1. #1
    fadzly Guest

    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.

  2. #2
    Join Date
    Oct 2008
    Posts
    221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  3. #3
    Join Date
    Jan 2008
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Garbage, dumb, and uniformed. If you think you need to disable selinux you fail first thing.

  4. #4
    Join Date
    Jan 2009
    Location
    Florida, USA
    Posts
    104
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What they are really saying is welcome to the forum - lmao! wth!

  5. #5
    Join Date
    Jan 2008
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by nix
    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.

  6. #6
    Join Date
    Apr 2005
    Posts
    344
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by khaytsus
    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

  7. #7
    Join Date
    Dec 2009
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.

  8. #8
    Join Date
    Jan 2008
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jkgruet
    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.

  9. #9
    Join Date
    Dec 2009
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  10. #10
    Join Date
    May 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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> '

  11. #11
    Join Date
    Jul 2010
    Location
    Philippines
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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??

  12. #12
    Join Date
    Mar 2013
    Location
    Chittagong
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Setting up Samba to share your Linux folders to Windows in Fedora 8

    Nice Post hope it will be helpful

Similar Threads

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •