How to Create SAMBA Server

“Samba is an Open Source/Free Software suite that provides seamless file and print services to SMB/CIFS clients.” Samba is freely available, unlike other SMB/CIFS implementations, and allows for interoperability between Linux/Unix servers and Windows-based clients.

By Default Port # 139

Step 1: Installation

Install the required packages in order to install samba server

# yum install samba samba-client samba-common

Step 2: Configuration

Now to configure samba edit the file /etc/samba/smb.cnf before making changes I will make the backup of original file as /etc/samba/smb.cnf.bak

# mv /etc/samba/smb.cnf /etc/samba/smb.cnf-bk

Now edit the /etc/samba/smb.cnf file.

# vi /etc/samba/smb.cnf

workgroup = WORKGROUP
server string = Samba Server %v
netbios name = centos
security = user
map to guest = bad user
dns proxy = no
#============================ Share Definitions ============================== 
path = /samba/folder
browsable =yes
writable = yes
guest ok = yes
read only = no

Step 3: Create SMB User

Use the following command to add a new Samba user:

# smbpasswd -a username

Step 4: Create SAMBA Group

To create SAMBA group:

# groupadd smbusers
# chown smbusers:smbusers /smbfolder
# usermod -G smbusers user

Create Directory /samba/folder using mkdir command:

# mkdir -p /samba/folder/

Give the permissions to /samba/folder/ directory

#chmod -R 0777 /samba/folder/

Step 5: Start SAMBA Service

Restart the smb service

# service smb restart
# service nmb restart

To Enable smb in multi-user levels.

# chkconfig smb on
# chkconfig nmb on
6 replies
  1. Nail artsjablonen
    Nail artsjablonen says:

    Its like you read my mind! You seem to know so much about this, like
    you wrote the book in it or something. I think that you could do with a few pics to drive
    the message home a little bit, but instead of that, this is fantastic blog.
    A great read. I will definitely be back.

  2. moan sfx
    moan sfx says:

    This design is spectacular! You most certainly know how to keep a reader entertained.

    Between your wit and your videos, I was almost moved to start my own blog (well,
    almost…HaHa!) Fantastic job. I really loved what you had to say,
    and more than that, how you presented it. Too cool!

  3. says:

    Do you mind if I quote a couple of your
    articles as long as I provide credit and sources back to your weblog?
    My website is in the exact same niche as yours and my visitors would genuinely benefit from some of the information you present
    here. Please let me know if this okay with you. Thanks!


Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *