Tutorials/SMB

From LinutopWiki

Share files with Windows

It's possible to share files with a Windows system over the network with your Linutop.

Up to version 1.1.5 you'll have to install the smbfs package. In a terminal:

 sudo apt-get install smbfs

and make some bianries suid root:

 sudo chmod 4755 /usr/bin/smbmnt
 sudo chmod 4755 /usr/bin/smbumount

This package will be in the default packages set in the version 1.1.6.

Prerequisites

You'll need a few informations about your windows installation:

  • its IP address (the local network ip, usually something like 192.168.0.2
  • the name of the directory you want to share, and the user who owns it
  • the password if you set one.

Mount the shared directory

The windows shared directory will be seen as a device, and thus needs to be 'mounted'. To do so:

  • create a 'mount point' (an empty directory):
 mkdir ~/shares
  • use the smbmount command:
 smbmount //192.168.0.2/shared_directory ~/shares -o username=windows_user,password=pass

where 192.168.0.2 is the IP address of the Windows machine, shared_directory an Windows share directory. If you don't need a password, just leave it empty (end the command with password=).

You can now acces the files in ~/shares, just like you access any other file of your system.

Note: the IP address can be replaced by the hostname of the windows box.