Knowledge7

The Linux and Mobile Solution Provider

  • About
  • Training
  • Services
  • Clients
  • In the news
  • Blog
  • Contact Us
You are here: Home / Topic / NFS and Samba

NFS and Samba

This topic is part of our Linux Network Services and Security training

Network File System

Network File System (NFS) allows remote hosts to mount file systems over a network and interact with those file systems as though they are mounted locally. NFS is configured by editing /etc/exports. Note that the defaults settings for NFS shares are ro (read-only), sync, wdelay and root_squash. It is possible to use all_squash and specify anonuid and anongid. Hostnames should follow a specific format.

The mount command (when used with the appropriate options) can be used to connect to an NFS share. Naturally, one can also edit /etc/fstab so that NFS mounts are done automatically at boot time.

Samba

Samba is an important software as it allows Linux computers to easily communicate with computers running Windows.

Samba can:

  • Serve directory trees and printers to Linux, UNIX, and Windows clients
  • Assist in network browsing (with or without NetBIOS)
  • Authenticate Windows domain logins
  • Provide Windows Internet Name Service (WINS) name server resolution
  • Act as a Windows NT-style Primary Domain Controller (PDC)
  • Act as a Backup Domain Controller (BDC) for a Samba-based PDC
  • Act as an Active Directory domain member server
  • Join a Windows NT/2000/2003/2008 PDC

What Samba cannot do:

  • Act as a BDC for a Windows PDC (and vice versa)
  • Act as an Active Directory domain controller

Samba can be configured by editing /etc/samba/smb.conf but most people prefer using a graphical tool such as SWAT (it is important to add FLAGS = IPv4 in its xinetd configuration). When configuring Samba, it is possible to create a share:

[shared]
comment = This is a Linux share
path = /home/shared/
valid users = john, jane
public = no
writable = yes
printable = no
create mask = 0644

Valid users (e.g. john and jane in the above example) need to be assigned SMB passwords which can be distinct from their Linux password. The smbpasswd command need to be used.

Shares can then be accessed using Nautilus and even mounted in Linux using the cifs filesystem type. Samba comes with a number of useful command line tools which system administrators should be aware of.

This topic is part of our Linux Network Services and Security training

Our forthcoming training courses

  • No training courses are scheduled.

Leave a Reply

Your email address will not be published. Required fields are marked *

Looking for something?

Want to know more?

Get our newsletter

Discover the latest news, tips and tricks on Linux, the Web and Mobile technologies every week for FREE

This work is licensed by Knowledge7 under an Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license.