Offering Windows File Sharing Service


Fedora Core 4 includes software that enables your Linux computer to share files with Windows computers on your network. This software is often referred to by its proper name, Samba, or by the type of high-level protocol it usesServer Message Blocks, or SMB.

The Windows file server is not installed by default in Fedora Core 4 unless you chose the Server installation option when you were installing Fedora Core 4 on your computer. Activating your Windows file server is therefore a matter of several steps:

1.

Install the Windows file server.

2.

Use the Samba Server Configuration tool to make Windows shares available to network users.

3.

Configure the Windows file server to start automatically each time you boot your computer system.

4.

Configure your firewall to allow Windows file sharing requests.

Installing Windows File Sharing Service

To ensure that the Windows file server is installed or to install it if it hasn't already been installed, follow these steps:

1.

Open the Package Management tool by choosing Desktop, System Settings, Add/Remove Applications.

2.

Check the box next to the Windows File Server package group, as shown in Figure 33.6. Then click the Update button to update your system.

Figure 33.6. In the Package Management tool, check the box next to the Windows File Server package group.


3.

When the list of changes is displayed in a confirmation dialog box, click Continue to install the Windows File Server on your Fedora Core 4 system.

4.

Log out of your desktop and then log back in again to update the list of applications in your menus.

The Windows file server and related tools should now be installed on your system and ready for use.

Starting the Samba Server Configuration Tool

The Samba Server Configuration tool is used to provide Fedora Core 4 with details about which files and directories should be made available to other Windows hosts on your network. To start the Samba Server Configuration tool, choose Desktop, System Settings, Server Settings, Samba. The Samba Server Configuration tool appears, as shown in Figure 33.7.

Figure 33.7. The Samba Server Configuration tool tells Fedora Core 4 which files and directories you want to share.


Deciding on a Security Model

You can choose to give access to Windows file sharing users in two ways for a given shared folder or set of files:

  • Complete, public access. After you share a file or directory, it is available to everyone on your network.

  • Per-user access. After creating a list of users who should have access to Windows file sharing on your Fedora Core 4 computer, you give access to shared files or directories on a per-user basis, drawing from this list.

You can use a combination of these two paradigms, giving complete public access to some shared files or directories, while restricting other shared files or folders to a select list of users.

Creating a Samba User List

To limit access to shared files or directories on a per-user basis, you must create and maintain a list of Samba users on your Fedora Core 4 system. To edit the list of Samba users, choose Preferences, Samba Users from the Samba Server Configuration tool's menu bar. The Samba Users dialog box is displayed, as shown in Figure 33.8.

Figure 33.8. Using the Samba Users dialog box, you can maintain the list of users given access to Samba shares.


To add a new user to this list of users, click the Add User button on the right side of the dialog box. Another dialog box, labeled Create New Samba User, is displayed, as shown in Figure 33.9.

Figure 33.9. Using the Create New Samba User dialog box, you can create a new Samba user, linking a Fedora Core 4 user account to a remote Windows system account.


Follow these steps to fill out the fields in the Create New Samba User dialog box:

1.

In the Unix Username drop-down list, select the name of the local (Fedora Core 4) user who will be gaining access to this computer's files across the Windows network.

2.

In the Windows Username text entry box, enter the user's account name on the Windows network or on the remote Windows host.

3.

In the Samba Password text entry box, enter the user's Windows network or Windows host password.

4.

Reenter the password in the Confirm Samba Password box to be sure that you've typed it correctly.

5.

Click OK to save your changes and add the user to the list of Samba users.

Repeat these steps for each Fedora Core 4 user who needs to be given access to Fedora Core 4 files while using remote Windows computers. After you finish editing the user list, click OK to close the Samba Users dialog box and save your changes.

Editing and Deleting Samba Users

You may have noticed two other buttons in the Samba Users dialog box. These buttons do exactly what you would expect them to do, based on their labels.

The Edit User button is used to edit settings for the user who is currently selected in the list. When you click Edit User, a dialog box identical to the Create New Samba User dialog box appears, with settings already filled out for the user in question. Edit them as necessary and click OK to save your changes.

The Delete User button is used to remove the user who is currently selected from the Samba users list. The deleted user loses all Windows networking privileges to your Fedora Core 4 computer, except for shared files or directories that are marked as public.


Creating Windows Shares

Windows networking makes files and directories available in units known as shares. To create a new share that will be made available from your Fedora Core 4 system, choose File, Add Share or click the Add button near the top of the Samba Server Configuration tool window. The Create Samba Share dialog box is displayed, as shown in Figure 33.10.

Figure 33.10. The Create Samba Share dialog box helps you to create new shares that will be made available from your Fedora Core 4 computer.


To add a share in the Create Samba Share dialog box, follow these steps:

1.

Enter the path (folder or directory tree) that you want to share in the Directory text entry box.

2.

Enter the name of the share in the Share box. This is the name of the icon under which the directory will appear when others browse your computer. For example, some appropriate share names might be HardDrive, PublicFiles, or Graphics.

3.

Enter a brief human-readable description of this share in the Description box.

4.

Check the Writable box if you want to grant both read and write permission to other hosts on the network, or leave it unchecked if the directory should be shared for reading only.

5.

Check the Visible box if you want the share to show up in other users' file managers when they browse your computer. Leave it unchecked if remote users should have to request the share by name to see it.

6.

Click the Access tab in the Create Samba Share dialog box.

7.

If you want to make the share public (accessible to everyone on the network), select Allow Access to Everyone. Otherwise, select Only Allow Access to Specific Users and then place checks in the boxes next to the names of users who should be allowed to access this share on the network, as shown in Figure 33.11.

Figure 33.11. To limit share access to a specific group of users, select Only Allow Access to Specific Users; then check the boxes by their names.


8.

Click OK to save the share you have created.

Permissions Matter When Files Are Shared

Even if a user or group of users is given read-only or read/write permission for a share, Linux file system permissions are still in charge. The remote user's ability to read from or write to a shared file or directory is limited by the permissions given to that user by the Linux file system. For more information on file system permissions, refer to Chapter 7, "Understanding File Properties."


Repeat this process for each share that you need to create. After you finish creating all the shares you need, choose File, Quit or click the Close button near the upper right of the application window to save your changes.

Starting and Autostarting Windows File Service

To start the Windows file server from your desktop after you configure it, choose Desktop, Server Settings, Services to display the Service Configuration tool. Select the smb service; then click the Start button near the top of the application window, as shown in Figure 33.12.

Figure 33.12. To start Windows file sharing, select the smb service and click Start. To cause the service to start each time Fedora Core 4 starts, check the box next to smb.


To cause Windows file sharing to start each time Fedora Core 4 starts, check the box next to the smb service, then click Save, and then choose File, Quit to exit the Services Configuration tool.

From the command line, you can start Windows file sharing by using the service command you learned about in Chapter 28:

 [root@workstation20 you]$ /sbin/service smb start [root@workstation20 you]$ 

You can configure the Windows file server to start automatically for your default runlevel by using the chkconfig command at the command line along with the --level option, supplying smb and the word on as arguments:

 [root@workstation20 you]# /sbin/chkconfig --level 5 smb on [root@workstation20 you]# 

Allowing Windows File Service Through Your Firewall

Although your Windows file server is now fully configured and running, users on your network cannot access your Windows shares until you tell the firewall to allow Windows file service traffic.

To enable Windows file service traffic, start the Security Level Configuration tool by choosing Desktop, System Settings, Security Level. Configure your firewall as usual but enter the following additional ports into the Other Ports entry box at the bottom of the tool:

 137:tcp,137:udp,138:tcp,138:udp,139:tcp,139:udp 

Once again, be sure to enter these ports as well as any other special ports you configured for your firewall because each time you run the Security Level Configuration tool, it replaces the previous settings instead of augmenting them. After you configure your firewall, click the OK button to save and activate your firewall settings and close the Security Level Configuration tool.



    SAMS Teach Yourself Red Hat(r) Fedora(tm) 4 Linux(r) All in One
    Cisco ASA and PIX Firewall Handbook
    ISBN: N/A
    EAN: 2147483647
    Year: 2006
    Pages: 311
    Authors: David Hucaby

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net