OS4XBox setup Windows File Sharing (Samba)

From OS4X

Jump to: navigation, search

Contents

Goal

You want to access a directory of your OS4XBox and want to enable Windows File Sharing (Samba) on this machine. This also allows you to copy files from and to your OS4X installation with the proper permissions so OS4X can handle the files correctly.

Requirements

You need:

  • the IP address or resolvable hostname of your OS4XBox
  • a webbrowser
  • internet connection (for package installation)

Installation and configuration process

With these steps you can enable Samba as a file sharing service on your OS4XBox.

Log into Webmin

Open a webbrowser and point it to your OS4XBox (i.e. by the IP address). Select Webmin in the application selection. Accept any certificate notifications of the browser (since Webmin uses its own self-signed certificate). Login with username

root

and the actual password (default: "os4x").

Image:Samba-1-webmin-login.png


Install software

In the left menu, select "System", then "Software packages":

Image:Samba-2-webmin-software-packages.png

Then, activate the radio button at "Package from APT" and insert the text "samba" in the text field. Afterwards, press the button "Install":

Image:Samba-3-webmin-install-samba.png

After successful installation, a message like this should appear:

Image:Samba-4-webmin-installed-samba.png

Click on "Return to module index" on the buttom of the page.

Again, activate the radio button at "Package from APT" and insert the text "smbclient" in the text field. Afterwards, press the button "Install":

Image:Samba-5-webmin-install-samba-client.png

After successful installation, a message like this should appear:

Image:Samba-6-webmin-installed-samba-client.png

Refresh Webmin

On the left hand side, click on the menu "Refresh Modules" and wait until the command finished (this may take about 15-20 seconds):

Image:Samba-7-webmin-refresh.png

Image:Samba-8-webmin-refreshed.png

Configure Samba

A new menu entry has been added at "Servers": "Samba Windows File Sharing". Click on this menu entry:

Image:Samba-9-webmin-samba-file-sharing.png

Create a new file share

Click on the textual link "Create a new file share." above or below the share table. A new mask appears:

Image:Samba-10-webmin-create-share.png

Configure this share as follows:

  • Share name: name of the share, i.e. "os4x" in this example. You can use any share name you want (this is being referenced later)
  • Directory to share: in this example, we share "/opt/os4x" which is the complete OS4X installation. You may want to share the incoming or outgoing directory only, it's up to you. Use the button "..." to browse the available directories of the OS4XBox.

The rest can be left on the defaults, you may want to change any of these parameters on your demand.

Click on the button "Create" in order to create this share.

Edit share parameters

Click on the new share entry in the share table in order to edit the parameters:

Image:Samba-11-webmin-click-share-os4x.png

Image:Samba-11-2-webmin-clicked-share-os4x.png

In the section "Other Share Options", click on "Security and Access Control". The following parameters could be changed:

  • Writable: set to "yes" if you want to be able to write to this share

Other parameters are intuitively what you would expect on their description, it's recommended to leave them untouched unless you need to change them.

Click on the button "Save" after having changed parameters.

Image:Samba-12-webmin-edit-share.png

In the "Edit File Share" overview, click on the entry "File Permissions":

It's best practice to change the fields to the following values in order to keep OS4X work on file permissions which are open enough:

  • New Unix file mode: 666
  • New Unix directory mode: 777

Click on the button "Save" after having changed parameters.

Image:Samba-13-webmin-edit-share-permissions.png

Edit Samba user

Return to the Samba overall administration either via the link "Return to share list" or via the menu item "Servers" -> "Samba Windows File Sharing" as done before.

In the section "Samba users" click on "Edit Samba users and passwords". In the following overview of automatically migrated users click on the entry "os4x" in order to edit it:

Image:Samba-14-webmin-users.png

Since this user doesn't has a password at all, give it a new password (used for later authentification). Activate the radio button at "New password", enter a new password and click on the button "Save"

Image:Samba-15-webmin-edit-user-os4x.png

Afterwards, click on "Return to share list".

Restart Samba

In order to take all changes into effect, you have to restart the Samba service by clicking on the button "Restart Samba Servers".

Image:Samba-16-webmin-restart-samba.png

You are now able to connect a client to your newly created share from any client.

Client connection

In order to connect a client to your share, follow the steps according to your operating system.

Windows XP

Open Explorer (the file manager, not the Internet Explorer). Select the menu entry "Extra" -> "Connect network drive":

Image:Samba-winxp-explorer-1.png

Assign a drive letter (in this case "O:") and as directory, use the following schema:

\\<IP or hostname>\<share name>

Image:Samba-winxp-explorer-2.png

Select the entry "connect as different user" and enter the credentials for the user "os4x":

Image:Samba-winxp-explorer-3.png

Save all attributes by finishing the configuration.

Mac OS X

Open Finder, click in the menu "Go to" the entry "Connect to server...":

Image:Samba-mac-finder-1.png

In the newly opening windows, add the address of the Samba server with the following format:

smb://<IP or hostname>/<share name>

You may want to add it with the plus sign ("+") to your favorite shares:

Image:Samba-mac-finder-2.png

During the connection process, you will be asked for authentification. Enter the username "os4x" and the corresponding password (given above). You may want to save this password in your system in order not to enter it every time.

Image:Samba-mac-finder-3.png

Views
Personal tools