This Instructable is based on Linux Ubuntu 9.04. The instructions on setting it up with newer versions will be pretty much identical
I will focus on just setting up a file server in this Instructable, although Samba can be expanded to run as an Active Domain Controller for Windows and a lot more
Step 1: Background on Samba
Samba-3 by Example explains further, saying:
Samba is software that can be run on a platform other than Microsoft Windows, for example, UNIX, Linux, IBM System 390, OpenVMS, and other operating systems. Samba uses the TCP/IP protocol that is installed on the host server. When correctly configured, it allows that host to interact with a Microsoft Windows client or server as if it is a Windows file and print server.
From The Official Samba HOWTO:
The goal behind the project is one of removing barriers to interoperability.
Samba is a software package that gives network administrators flexibility and freedom in terms of setup, configuration, and choice of systems and equipment. Because of all that it offers, Samba has grown in popularity, and continues to do so, every year since its release in 1992.
For more details on Samba or SMB, see:
Intro to Samba
- From here
Step 2: Let's Start!
Step 3: Configure Samba
- Scroll down to Global Settings in the .conf file
Add netbios name = server and replace server with whatever you want the servers name to be
- Scroll down to Share Definitions in the .conf file
Change %S next to valid users to the users you want to be able to access this drive (we will add users to the system in the next step)
Un-comment the options there ([homes], comment, browseable, read only and valid users) by removing the ; in front of them
If you want to add more drives just repeat those options e.g.
comment = Data
path = /export
force user = thermoelectric
force group = users
read only = No
Path is where that shared drive is located.
Step 4: Adding Users to Samba
sudo useradd -c "Thermoelectric Rules" -m -g users -p password Thermoelectric
You replace password with that users password. You replace Thermoelectric Rules with your real name. You replace Thermoelectric with your user name.
Repeat that until you have made a account for all of your users
Then add the users to Samba by typing this into terminal e.g
sudo smbpasswd -a Thermoelectric
Replace Thermoelectric with your user name
Repeat until you have added all your users to Samba
Step 5: Start and Test Samba
sudo nmbd; smbd;
Configure the /export directory:
sudo mkdir /export
sudo chown Thermoelectric.users /export
sudo chmod u=rwx,g=rwx,o-rwx /export
Check that Samba is running correctly:
sudo smbclient -L localhost -U%
Connect to SERVER (netbios name) as Thermoelectric (your user name):
sudo smbclient //SERVER/Thermoelectric -UThermoelectric%password
Step 6: Finish!
If you experience any errors while installing and using Samba, I will be glad to help.
Have you succeeded installing and using Samba? If so comment!
Is there anything you think I need to add to this Instructable? Comment and tell me!
Thanks. Please comment and rate