Saturday, 27 February 2016

SMB Filesharing in Kubuntu 14.04...

Filesharing


NFS

NFS is the default networking protocol for network file sharing in *nix systems (including (K)Ubuntu Linux). Here are some tips for setting up NFS from the Little Girl's Mostly Linux Blog.

Samba File Sharing


Samba client

Samba is a networking protocol that allows compatibility with Windows-based networks. The Samba client is installed by default in Ubuntu and should work seamlessly (unless you have have a firewall blocking the ports).

Samba server

Samba provides file/print services for the SMB/CIFS protocol used in Windows-based networks. See the official Ubuntu documentation for more information about providing services in a Windows network. A Samba server can be installed using the tasksel option during installation of the Ubuntu server from the LiveCD, or at any time using:
sudo tasksel install samba-server
  • An alternative method of installation is:
sudo apt-get install samba samba-tools system-config-samba smbfs
Note: samba-tools, system-config-samba, and smbfs are optional.
  • Modify Samba settings.
  • Method 1:
Menu -> System -> Administration -> Samba
(Note: this is available only if you installed system-config-samba.)
It is recommended that your user be a member of the sambashare group, as well. 
[I was not able to add myself because Kubuntu 14.04 did not have a menu for groups. I had to install kuser and run it from the console to do this]
  • Method 2:
Enable File Sharing Server With User Login (Very Reliable Method) 
see  https://help.ubuntu.com/community/Samba/SambaServerGuide
Do the following on the machine that has the files to be shared:
  • Add current user to Samba:
sudo smbpasswd -a username
(replacing username with your login username)
  • Open the samba config file:
sudo nano /etc/samba/smb.conf
  • Add the directories to be added (right at the end) in the following format:
[Pictures]
path = /home/username/<folder_to_be_shared>
(Replace username with your username and <folder_to_be_shared> with the folder you want to share)
Press CTRL+X and then Y to save.
  • Restart Samba:
sudo service smbd restart
sudo service nmbd restart
Note: Prior versions used:
sudo /etc/init.d/samba restart
  • On Windows access the folder in the following format in Windows Explorer:
\\192.168.x.x
(replace 192.168.x.x with the actual IP address of your server which is serving the folder)
  • On Linux type the following in Konqueror or Nautilus:
smb://192.168.x.x
(replace 192.168.x.x with the actual IP address of your server serving the folder)
Note: If you use Sharing in KDE's System Settings panel, be aware that there is a small bug, reported here. In brief, you need to comment out/delete any instances of these two lines in /etc/smb.conf :
case sensitive
msdfs proxy

Change your Workgroup

To change your Samba (Windows network) workgroup:
sudo nano /etc/samba/smb.conf
Look for the line:
workgroup = WORKGROUUP
and change the setting to whatever your LAN workgroup is.

Recognizing Win98 machines

Microsoft networking is extremely quirky. To enable recognition of PCs with Windows 98, edit your Samba configuration file:
sudo nano /etc/samba/smb.conf
Then add the following lines to the file:
[global]
# THE LANMAN FIX
client lanman auth = yes
client ntlmv2 auth = no

Integrating into Mac OS X Network

See this guide for information on integrating Ubuntu into an existing Mac OS X Appletalk network.

No comments: