Installation & Configuration of SAMBA Server(RHEL5)

Step 1:- Indentify the Server which will be designated as SAMBA server.
Step 2:- Login to the Server with root login and password.
Step 3:- Open a terminal window by going to Applications  Accessories  Terminal
Step 4:- Check if SAMBA packages are pre-installed, to do this type the following commands in the terminal
[root@monitor ~]# rpm -qa | grep samba
[root@monitor ~]#

If SAMBA packages are pre-installed you will get the above output, If you do not get the above output it means
the SAMBA packages are not installed and you will have to manually install it.
Step 5:- Manually installing the SAMBA Packages.
[root@monitor ~]# mount /dev/cdrom /media
[root@monitor ~]# cd /media/Server
[root@monitor ~]# ls | grep samba


[root@monitor ~]# cp samba-* /usr
[root@monitor ~]# cp system-config-samba-* /usr
[root@monitor ~]# cd /usr
[root@monitor ~]# rpm –ivh samba-3.0.23c-2.i386.rpm
[root@monitor ~]# rpm –ivh samba-client-3.0.23c-2.i386.rpm
[root@monitor ~]# rpm –ivh samba-common-3.0.23c-2.i386.rpm
[root@monitor ~]# rpm –ivh samba-swat-3.0.23c-2.i386.rpm
[root@monitor ~]# rpm –ivh system-config-samba-1.2.39-1.el5.noarch.rpm

Step 6:- Configure the SAMBA configuration file.
[root@monitor ~]# cd /etc
[root@monitor etc]# cd samba/
[root@monitor samba]# mv smb.conf smb.conf.redhat
[root@monitor samba]# touch smb.conf

Now edit the samba configuration file with your favourite editor and add the
following entries in the smb.conf file.
workgroup = workgroup
netbios name = File Server
netbios aliases = File Server
server string = WINDOWS
smb passwd file = /etc/samba/smbpasswd
interfaces = IP of SAMBA Server/24,
bind interfaces only = Yes
log file = /var/log/samba.log.%m
hosts allow = IP pool of the subnet which will access the SAMBA server/24
hosts deny = ALL, EXCEPT,,
path = /home/data
read only = No
Note: Once you have add the above entries in the SAMBA configuration file save the
file and exit from the editor.
Step 7:- Create the share directory.

[root@monitor ~]# cd /home
[root@monitor home]# mkdir data

Step 8:- Create a VLU and set a SAMBA password for this user.
[root@monitor ~]# useradd abc
[root@monitor ~]# smbpasswd -a abc
New SMB password:
Retype new SMB password:
[root@monitor ~]#

Step 9:- Change the permissions of the “share folder” so that only user “hari” can access the “share folder”
[root@monitor ~]# cd /home
[root@monitor home]# ls -ld data
drwxrwxr-x 18 root root 4096 Sep 4 13:59 data
[root@monitor home]#
[root@monitor home]# chown -R abc:abc data

Step 10:- Check if the SAMBA configuration file is OK

[root@monitor ~]# testparm
Note: If the configuration file is OK then you get the output similar to as shown
Load smb config files from /etc/samba/smb.conf
Processing section “[SHARE-FOLDER]”
Loaded services file OK.
Press enter to see a dump of your service definitions (Press Enter Key Here)
workgroup = workgroup
netbios name = workgroup
netbios aliases = PILOT-SERVER
server string = WINDOWS
interfaces = IP address of the SAMBA server/24,
bind interfaces only = Yes
log file = /var/log/samba.log.%m
hosts allow = IP pool of the subnet which has to be allowed/24
hosts deny = ALL, EXCEPT,,
path = /home/data
read only = No
Note: if you do not get an output similar to the above output then check
“/var/log/messages” for any errors.
[root@monitor ~]# tail –f /var/log/messages

Step 11:- Start the SAMBA services.
[root@monitor ~]# chkconfig –level 35 smb on
[root@monitor ~]# service smb restart
Shutting down SMB services: [ FAILED ]
Shutting down NMB services: [ FAILED ]
Starting SMB services: [ OK ]
Starting NMB services: [ OK ]
[root@monitor ~]#
Step 12:- Test if you are able to access the SAMBA Share.
Linux Server and Linux Client (Commands to be typed in terminal window).
# smbclient //SAMBA Server IP/SHARE-FOLDER -U VLU
# smbmount //SAMBA Server IP/SHARE-FOLDER /win
# smbclient -M SAMBA Server IP address
Linux Server and Windows Client (Commands to be type in command prompt).
C:\ net view
C:\ net view IP
C:\ net use * \\SAMBA Server IP address\SHARE-FOLDER
C:\ net use * /d
C:\ nbtstat -a IP


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s