samba server configuration on linux.


 
Thread Tools Search this Thread
# 1  
samba server configuration on linux.

Today I have configured samba server on my linux machine .I thought it would be better if i share it here and get feedback from an experienced users.

This configuration is based on Redhat release 5.

Code:
# lsb_release -a
LSB Version:    :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: EnterpriseEnterpriseServer
Description:    Enterprise Linux Enterprise Linux Server release 5.2 (Carthage)
Release:        5.2
Codename:       Carthage


First check to see if samba server is installed or not.

Code:
# rpm -q samba
package samba is not installed

However you can find samba client installed on most of Linux Distributions.

Code:
# rpm -qa | grep samba
samba-common-3.0.28-0.el5.8
samba-client-3.0.28-0.el5.8


To get the samba server package the best place to for is your Distribution disk.
I have searched my OS disk and found following package for samba.
samba-3.0.28-0.el5.8.i386.rpm

install the above package on the system using.
Code:
# rpm -ivh samba-3.0.28-0.el5.8.i386.rpm


After successful installation just run “rpm –q samba “ To check if samba is installed or not.
Code:
# rpm -q samba
samba-3.0.28-0.el5.8

Samba configuration file is stored at following location.
Code:
/etc/samba/smb.conf

Samba service name.
Code:
smb

To start samba service at system starup use chkconfig command.

To check the current runlevel of smb service.
Code:
# chkconfig --list | grep smb
smb             0:off   1:off   2:off   3:off   4:off   5:on    6:off

To start the service at system startup use.
Code:
chkconfig --level 345 smb on

reconfirm with below command.

Code:
# chkconfig --list | grep smb
smb             0:off   1:off   2:off   3:on    4:on    5:on    6:off

restart the machine and check the smb service status.
Code:
# service smb status
smbd (pid 4712 4671) is running...
nmbd (pid 4684) is running...


create samba users.

First, lets create the smbpasswd file that we defined in the smb.conf file. The best way to go about this is to create it based on your existing /etc/passwd file. In other words, samba users are created based on existing linux users:
Code:
cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd

after execution a new file will be created under /etc/samba directory.
Code:
#ls /etc/samba/
lmhosts  passdb.tdb  secrets.tdb  smb.conf  smb_orig.conf  smbpasswd  smbusers

the password for samba user is not similar to existing system users.
We need to manually set the samba user.
Code:
# smbpasswd root
New SMB password:
Retype new SMB password:

Now its time to edit samba configuration file .
Take a backup of original file using.
Code:
# cp /etc/samba/smb.conf /etc/samba/smb_orig.conf

Delete all entries.Add following values inside the configuration file .

Code:
*************************************************************

[global] 
workgroup = PUTIEVILLE 
server string = My Lil Linux Box 
hosts allow = 192.168. 127. 
log file = /var/log/samba/%m.log 
security = user 
encrypt passwords = yes 
smb passwd file = /etc/samba/smbpasswd 
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 

[Downloads] 
comment = Downloads 
path = /
 browseable = yes 
writable = yes 
public = yes 
read only = no 

[homes] 
comment = My Home Directory 
browseable = yes 
writable = yes 
public = yes 
read only = no 

[printers] 
path = /var/spool/samba 
public = yes 
guest ok = yes 
printable = yes 
browseable = yes 
writable = yes 
read only = no
******************************************************

Description:

Code:
[global]
hosts allow = 192.168. 127.

This line will allow samba server accessible from 10.180.18 series and localhost .

Code:
smb passwd file = /etc/samba/smbpasswd

This will tell samba to use smbpasswd file from mentioned location

Code:
[Downloads]
comment = Downloads 
Name of the share
path = /

Path that should be made available for all.


Restart the smb service and access the files through windows login.
 

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

10 More Discussions You Might Find Interesting

1. IP Networking

Samba ha configuration require

I HAVE TO DESIGN TWO NODE SAMBA HA SERVER, TO DO THIS I NEED YOUR HELP, HOW CAN CONFIGURE SUCH SCENARIO? REGARDS PRAMOD INGOLE (4 Replies)
Discussion started by: pramod_ingole
4 Replies

2. Red Hat

What are Linux configuration changes required after a cloned VM Server is started?

Dear Expert Users, VMware Admin Tool is used to create a "clone" of an existing VM RHEL Server. Now, I have a Project where a cloned VM Server image is started for run . Please share what are all configuration changes required to ensure this runs fine ? I will be grateful for quick and... (2 Replies)
Discussion started by: schandrakar1
2 Replies

3. UNIX for Dummies Questions & Answers

Ubuntu Server 14.04 LTS - domain controller configuration (SAMBA)

Hello! Never configured a Linux server from a scratch. Reviewed the official documentation and dozens of different "how to", but now one of them helped me to solve the issue. The need: My final goal is to install a small network (later with around 10 stations) where I can controle the... (0 Replies)
Discussion started by: AQwert
0 Replies

4. UNIX and Linux Applications

Samba configuration

Good morning. I installed Samba on my server but I need some help in consfiguratin: 1. Access only for users from my network 2. Create catalog for all users, users not login - only read, users log in - all(read, create, write) 3. Create catalog for users group. If we create some group users... (2 Replies)
Discussion started by: Budrys
2 Replies

5. UNIX and Linux Applications

Configuration of Linux cluster managment on Red Hat 5.x server

Hi Experts, I have question regarding linux cluster managment on Red Hat 5.x server. When I try to install 'luci' or 'ricci' in one of our linux servers it is giving me below error:- yum install luci Loaded plugins: katello, product-id, rhnplugin, security, subscription-manager Updating... (0 Replies)
Discussion started by: Amey Joshi
0 Replies

6. Solaris

solaris samba configuration without wins service from authentication window server/Active directory

Hi All, We are using solaris samba server for our company project to provide access to code to our development team.Recently our ICT has disabled wins service on Active directory due which user are not able to connect to samba share and they are getting error "No logon server available" as samba... (2 Replies)
Discussion started by: sahil_shine
2 Replies

7. UNIX for Dummies Questions & Answers

Samba setup in virtual server environment Windows/ Linux

I have a home network set up that consists of a few windows clients and 3 centos, and 1 suse client. These are all virtual machines, VMware Workstation. One centos vm is set to be the Samba server. Do I need Samba set up on the other Linux clients?I have no problem seeing the windows clients... (0 Replies)
Discussion started by: ktb231
0 Replies

8. UNIX for Dummies Questions & Answers

Check server configuration in Linux

Hi, How do i check the server configuration in Linux like the RAM size, OS version, type of database configured etc...basically i need everything about the server. Is there a command to see this information?? Thanks in advance!!! (7 Replies)
Discussion started by: stunnerz_84
7 Replies

9. Red Hat

Re:Configuration of samba services

Hi, Can any one give me the simple way of configuring samba services on the linux server & similarly what are the thing that have to be done on the client side. Thanks & Regards Venky (0 Replies)
Discussion started by: venky_vemuri
0 Replies

10. Linux

Samba configuration (?)

I'm trying to setup OpenSUSE 11.0 as a PDC on a small test network at home. So far it's sort of going good I guess. I'm setup SUSE and think I have configure Samba correct, well sort of. Not really what I was after. I wanted SUSE to act as a PDC and have a Windows XP machine be able to join... (1 Reply)
Discussion started by: woofie
1 Replies

Featured Tech Videos