Introduction: This article shows how to configure Samba to share files to a Workgroup in the local LAN, and to receive files from other members of the Workgroup. Here is a list of topics covered:
- Installation
- The Samba configuration file
- Make a copy (backup) of the default Samba config file
- Reconfigure the [global] Stanza for use in a Workgroup
- How to edit root-owned files like smb.conf
- How to blank out unwanted Shares
- How to Set up a Roaming Share (to share your personal Linux home files)
- Create Credentials to allow access to Secure Shares (like the [homes] share)
- How to Set up a specific secure Share for one user
- How to Set up an insecure Share with Guest access for all users on the LAN
- Configure the Firewall for Samba
- Activate the Samba daemons
- Modify the file nsswitch.conf to help Linux respond to pings from Windows
- Comments
Installation: Samba is usually installed by default. You can check that it exists with this console command:
Code:
rpm -qa | grep samba
A list of RPMs containing the word "samba" should appear in the console interface. If not, then you need to install Samba, perhaps using Yast:
Go to Yast ==> Software ==> Software Management.
Seach on samba and select to install samba, samba-client, samba-winbind, yast2-samba-server, yast2-samba-client.
Also search on cifs to install cifs-utils.
When you execute the installation, quite a few samba-based dependencies will come along too.
The Samba configuration file (smb.conf located at /etc/samba/smb.conf)
Code:
[global]
workgroup = WORKGROUP
passdb backend = tdbsam
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
map to guest = Bad User
include = /etc/samba/dhcp.conf
logon path = \\%L\profiles\.msprofile
logon home = \\%L\%U\.9xprofile
logon drive = P:
usershare allow guests = Yes
[homes]
comment = Home Directories
...