6.2. Samba Shares Managements

This tool allows you to define which folders and printers on your machine can be accessed by other machines on the network by means of the SMB/CIFS protocol, mainly used by Windows® machines. You can find it in the Network Sharing section of the Mandriva Linux Control Center.

Figure 6.2. DrakSamba Main Interface

DrakSamba Main Interface

The interface is composed of three tabs we will detail now, to manage folder shares, printer shares, and users allowed to access those shares.

6.2.1. Basic Server Setup

The first time you run the tool a wizard helps you configure basic server settings.

  1. Select the PDC option to have your system act as a domain controller for a Windows® network. Select the Standalone option to have your system act as a standalone server, not part of any domain. This is the recommended setting for simple file and print sharing services.

    Figure 6.3. Standalone Samba Server

    Standalone Samba Server

  2. Fill the Workgroup field with the name of the workgroup the system will serve. Fill the Netbios name field with the NetBIOS name of the system, that is the name your server will be known by other machines on the network.

    Figure 6.4. Workgroup and Server Names

    Workgroup and Server Names

  3. Use the Security mode pull-down list to choose the security level from user (clients authenticate once per session), share (clients authenticate per share) and domain (clients authenticate on a domain controller). The user level security mode is the recommended option.

    Figure 6.5. User Level Security Mode

    User Level Security Mode

  4. Fill the Banner field with a phrase to describe your system on the network. Please note that this phrase is arbitrary, however it is advisable to put something meaningful to the services your system will provide to the network.

    Figure 6.6. File Server Banner

    File Server Banner

  5. Choose the log settings: log file name, maximum log size (in KB), and the verbosity level. It is recommended that you leave settings at their defaults, that way there will be a per-client log file with reasonable maximum size and verbosity.

    Figure 6.7. Per-Client Small Log File Setting

    Per-Client Small Log File Setting

  6. Finally, review your settings and click Ok. Settings are applied and the Samba service is started.

6.2.2. Samba User Management

You must add a Samba user for each client that needs to connect to the Samba server for file and print sharing.

Procedure 6.2. Adding a Samba User

  1. Open the Samba Users tab.

  2. Click on Add, use the User name pulldown list to select the users defined in the Mandriva Linux system, then fill the password field.

    [Tip] Tip

    To simplify the configuration and connection of shared resources on Windows® clients, it's very important that both the user and password you set on the Mandriva Linux server are the same as the ones set for the client on his Windows® machine. Please bear in mind that case is important for both user and password, so Peter and peter refer to two different users.

6.2.3. File Sharing Settings

By default, the home file share is defined, giving Samba users access to their home folders on the Mandriva Linux server. We describe below how to add a public share with read/write access for all clients.

Procedure 6.3. Adding a File Share Resource

  1. Open the File share tab.

  2. Click on Add, fill the Name of the share (it can be any name, meaningful to the share contents, in our example “Public”); the Comment (again, it should be descriptive of the share contents, in our example “Public R/W Share”); and Directory with the name of the folder (it must be an existing folder) to be shared (for example, /home/samba/Public).

  3. Click Ok once you are satisfied with your settings.

Procedure 6.4. Modifying a File Share Resource

  1. Open the File share tab.

  2. Select the share to change (in our example, Public) and click on Modify.

  3. In the Samba share directory section change the Public (the file share is publicly accessible), Writable (it can be written to) and Browsable (it is shown on the Windows® client “Network Neighbourhood”) options to yes using the corresponding pulldown lists.

  4. You can optionally fine tune file permissions, file creation masks, filename case, and more options by opening the corresponding Advanced options.

  5. Click Ok once you are satisfied with your settings.

6.2.4. Printer Sharing Settings

By default, all printers configured in the Mandriva Linux system are available for the clients of the Samba server, and there's also a special printer named pdf-gen which generates PDF files, available only to valid Samba users. Select a printer share and click on Modify to fine tune printer sharing settings (valid users, printer drivers, etc.)