Samba

Samba

 

These days, a proper Windows file server is considered "commodity". NAS boxes are considered commodities too.

Should you wish not to stick to commodities and live "off-the-grid", your LAN documents sharing needs may simply be served by a simple CentOS box (configured with Samba).

 

"What's the catch"?!

  • No centralised Users management (such as when on Active Directory - unless OpenDirectory is "an option").
  • No simple GUIs (command line and text files are your friends).
  • No versioning or collaboration features (such as those partially offered by Shadow Copies, Microsoft Sharepoint or Google Docs - but "who needs these"?!).

If the above "compromises" do not instill enough "FUD" on you, a solution based off CentOS & Samba should be reasonably "good enough" to satisfy your basic files sharing needs.

 

Details please?

In this post, too many details may scare you off.

So what I'm going to do is simply share an old (but working) Samba file server config file.

Re hardware, given this is considered a commodity too, I will leave the choice upon you - your file server may be as easy as a mini ITX box.

The only suggestion I can't stop recommending is to place your data on a RAID-1 storage subsystem.

Also, in order to mitigate RAID-1 data corruption, please consider some form of backup.

Why RAID-1? Amongst other reasons, I am particularly fond of RAID-1's "plug'n'play nature" - pull hdd01 off computer X, connect hdd01 into computer Y and off you go - your data is served!

 

Working Samba config file please?

Here's my old Samba file server /etc/samba/smb.conf:

# Global parameters
[global] workgroup = WORKGROUP
server string = mein-fs
password server = None
username map = /etc/samba/smbusers
log file = /var/log/samba/%m.log
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printcap name = /etc/printcap
dns proxy = No
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
cups options = raw
[homes] comment = Home Directories
read only = No
browseable = No
[shared] comment = Shared Folder
path = /mnt/data/shared
force group = shared
read only = No
create mask = 0770
directory mask = 0775
inherit permissions = Yes

 

Ingrish plis?

The above Samba smb.conf files instructs the samba daemon to behave in a certain way.

Between square brackets ("[..]"), you will find Samba's customisations.

[global]" is the section where you specify Samba's server options.

After your global preferences, you'd usually specify the name of the folders shared on the network (ie. [homes] will share /home, [shared] will share /mnt/data/shared, etc.).

Each of these sections allows you to set specific options that affect the behaviour of the respective shared folder.

I'd like to consider the above options self-explanatory, 'though, If you'd like to dig deeper, feel free to ask or perhaps share your knowledge by commenting.

Senior Professional Network and Computer Systems Engineer during work hours and father when home.

Andrea strives to deliver outstanding customer service and heaps of love towards his family.

In this Ad-sponsored space, Andrea shares his quest for "ultimate" IT knowledge, meticulously brought to you in an easy to read format.

build a fileserver with CentOS and Samba.
2.5 (50%) 2 votes

Leave a Reply

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

Connect with Facebook