Google Plus

Build samba server in Fedora/Centos

Written by Mel Kham on . Posted in Linux tutorials

Samba is a free software re-implementation of SMB/CIFS networking protocol. as of version 3, Samba provides file and print services for various Microsoft Windows clients and can integrate with a Windows Server domain, either as a Primary Domain Controller (PDC) or as a domain member. It can also be part of an Active Directory domain.

Samba 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 standard on nearly all distributions of Linux and is commonly included as a basic system service on other Unix-based operating systems as well. Samba is released under the GNU General Public License. The name Samba comes from SMB (Server Message Block), the name of the standard protocol used by the Microsoft Windows network file system.

So lets  start :

1- Install  packges  needed  for  samba  server

# yum install cups-libs samba samba-common -y

2- make  Samba  starting and  make it  starting  with  boot   linux

 

#chkconfig --levels 235 smb on

Now start samba server

#/etc/init.d/smb start

 

3-Make  directories  of  samba  share  and  give  the  ownership   (you  can  make  other  name  directories)

# mkdir -p /home/sambashares/allusers

 

# chown -R root:users /home/sambashares/allusers

 

# chmod -R ug+rwx,o+rx-w  /home/sambashares/allusers

 

4-Edit   the  configuration :

# vi /etc/samba/smb.conf

add this  to the samba config file :

[allusers]
comment = All Users
path = /home/sambashares/allusers
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
writable = yes

 

if  you  want   te  make user   read  and  write  in  there   own directories  add  this  in  smb.conf

[homes]
comment = Home Directories
browseable = no
writable = yes
valid users = %S
create mask = 0700
directory mask = 0700

save  and  exit

5-add user  who  should  have  accesss to  samba  share    (change  Unixmen with  your  favorite  name)

#useradd unixmen -m -G users

6-make  a password  of  unixmen user

#passwd  unixmen

 

7-add the  password to  unixmen user to  samba  database.

smbpasswd -a  unixmen

 

8-Reboot  your  samba  service  with

# /etc/init.d/smb restart

Shutting down SMB services:                           [  OK  ]
Starting SMB services:                                     [  OK  ]

Enjoy  . now  you are  ready

Back  to   your  windows  machine  :   start run    IP-of-samba-server

For questions please refer to our Q/A forum at : http://ask.unixmen.com

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

HailsandNails

|

Actually, what I see too much of, and what Microsoft actually (sorta) did with Windows 8 is think forward. And let’s be brutally honest. Windows 8 is actually NOT as bad as people is making it out, they’re just freakishly afraid of change (which Linux users are as well, it seems)

SK

|

Yes i will. Keep visiting. Subscribe us to get daily updates. Thanks for the comment

Rakesh Vijayan

|

Hi SK

I am Rakesh vijayan thanks for your great work ,by your work I start to learn what is ldap , my request is will you make tutorial for ldap and samba pdc for us on ubuntu 12.04

Guest

|

It was a typo. Now its corrected. Thanks for pointing out.

Michael T

|

You shouldn’t be so stupid, in the first time.

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .