OS4XBox setup Windows File Sharing (Samba)
From OS4X
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").
Install software
In the left menu, select "System", then "Software packages":
Then, activate the radio button at "Package from APT" and insert the text "samba" in the text field. Afterwards, press the button "Install":
After successful installation, a message like this should appear:
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":
After successful installation, a message like this should appear:
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):
Configure Samba
A new menu entry has been added at "Servers": "Samba Windows File Sharing". Click on this menu entry:
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:
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:
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.
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.
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:
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"
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".
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":
Assign a drive letter (in this case "O:") and as directory, use the following schema:
\\<IP or hostname>\<share name>
Select the entry "connect as different user" and enter the credentials for the user "os4x":
Save all attributes by finishing the configuration.
Mac OS X
Open Finder, click in the menu "Go to" the entry "Connect to server...":
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:
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.
























