Samba Configuration
Samba provides file and print services for various Microsoft Windows clients and runs on most Unix and Unix-like systems, such as Linux, Solaris, AIX and the BSD variants, including Apple’s Mac OS X Server.
Samba is an implementation of dozens of services and a dozen protocols, including NetBIOS over TCP/IP (NBT), SMB, CIFS (an enhanced version of SMB), DCE/RPC or more specifically, MSRPC, the Network Neighborhood suite of protocols, a WINS server also known as a NetBIOS Name Server (NBNS), the NT Domain suite of protocols which includes NT Domain Logons, Secure Accounts Manager (SAM) database, Local Security Authority (LSA) service, NT-style printing service (SPOOLSS), NTLM and more recently Active Directory Logon which involves a modified version of Kerberos and a modified version of LDAP. All these services and protocols are frequently incorrectly referred to as just NetBIOS or SMB. Samba can also see and share printers.
The simplest way to find out if you have samba installed on your unix system is with the following command:
smbd -V
You will see something like:
Version 3.0.25b
The configuration file resides in /etc/samba and is named smb.conf. This file can contain only one line and still work:
[homes]
For more control you can start configuring the global options:
[global]
workgroup = Network
server string = IT Manager’s Samba
netbios name = Server
encrypt passwords = yes
log file = /var/log/samba/log.%m
security = user
These are the global options in which we set the name of the network and of the computer and also that we want the passwords encrypted. For file sharing we need to add the following lines:
[homes]
read only = no
browseable = no
This configuration will give each user on the system access to his own /home directory.
To create a folder in which all users ould have read/write permissions we first create it
mkdir /public
then add the next lines in smb.conf:
[public]
path = /public
read only = no
browseable = yes
I forgot to mention that after each change in the configuration file you must reload the samba server:
# service smb restart
Shutting down SMB services: [ OK ]
Shutting down NMB services: [ OK ]
Starting SMB services: [ OK ]
Starting NMB services: [ OK ]
For adding users to the samba server type this in the console:
# useradd -d /home/smbadmin -s /sbin/nologin -n smbadmin
# passwd smbadmin
Changing password for user smbadmin.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
# smbpasswd -a smbadmin
New SMB password:
Retype new SMB password:
Added user smbadmin.
#
This is it.
Tags: accounts manager, AIX, Apple, BSD, bsd variants, CIFS, conf, configuration, DCE, directory, domain, domain logons, dozen, file, global options, Home, implementation, Linux, local security, Log, Logons, Mac OS, mac os x, mac os x server, manager, Microsoft, microsoft windows clients, MSRPC, name, name server, NBNS, NBT, Neighborhood, NetBIOS, netbios name, network, network neighborhood, New, NMB, passwd, password, printing service, public path, Read, Retype, RPC, sam database, Samba, samba netbios, Secure, Security, Server, server samba, service, share printers, Shutting, SMB, smbadmin, smbd, Solaris, suite, System, TCP, UNIX, unix system, Unix-like, user, V You, version, Windows, WINS, wins server, wordsfinder, X Server


(4 out of 5)



Leave a reply