0% found this document useful (0 votes)
27 views

Install SAMBA On Fedora17 and Centos 6

Uploaded by

Aymen
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Install SAMBA On Fedora17 and Centos 6

Uploaded by

Aymen
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

5/26/2014 Install SAMBA on Fedora17 and Centos 6.

2 | Unixmen

Home
About Us
Advertising
Sitemap
Privacy
Contact Us

Page Navigation
search

Unixmen
Home
News
Today
Linux
Distributions
Tutorials
Knowledge Base
Opensource
News
Android
News
Frequently
Asked Question
Ask
Unixmen

Category Navigation
337 views 0 likes 0 comments
Posted September 12, 2012

Install SAMBA on Fedora17 and Centos


6.2
http://www.unixmen.com/install-samba-fedora17-centos-6-2/ 1/10
5/26/2014 Install SAMBA on Fedora17 and Centos 6.2 | Unixmen

by M.el Khamlichi

Share this Article: 0 0 20 0 0 0

Question : Howto Install SAMBA on Fedora17 and Centos 6.x?

Answer:

1- To install the samba package,enter the following command:


1 <strong>yum install samba samba-client samba-common</strong>

2- Configure the samba service, so that, it will start automatically


at boot time:
- Centos 6.2

1 <strong>chkconfig smb on</strong>


2 <strong>chkconfig nmb on</strong>
3 <strong>service smb start</strong>
4 <strong>service nmb start</strong>

- Fedora 17

1 <strong>systemctl enable smb.service</strong>


2 <strong> systemctl enable nmb.service</strong>
3 <strong> systemctl start smb.service</strong>
4 <strong> systemctl start nmb.service</strong>

3- Disable the SELinux:


1 <strong>nano /etc/selinux/config</strong>

Change SELinux from enforcing to disabled:

1 <strong>SELINUX=disabled</strong>

- Add these Iptables rules, so that samba will work perfectly:

1 <strong>iptables -I INPUT 4 -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT</strong>
2 <strong> iptables -I INPUT 5 -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT</strong>
3 <strong> iptables -I INPUT 6 -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT</strong>
4 <strong> service iptables save</strong>

4- Now edit samba config file


1 <strong>nano /etc/samba/smb.conf</strong>

Add these lines, in your smb.conf file (or change it according to your requirement):
1 #======================= Global Settings =====================================
2 [global]
3 workgroup = WORKGROUP
http://www.unixmen.com/install-samba-fedora17-centos-6-2/ 2/10
5/26/2014 Install SAMBA on Fedora17 and Centos 6.2 | Unixmen
4 security = share
5 map to guest = bad user
6 #============================ Share Definitions ==============================
7 [MyShare]
8 path = /samba/share
9 browsable =yes
10 writable = yes
11 guest ok = yes
12 read only = no

Save the smb.conf file and restart the service:

1 service smb restart


2 service nmb restart

Change it, in such a way that everyone can read and write it(Check if it is allowed in
your environment or not):

1 <strong>chmod -R 0777 /samba/share</strong>

4- Add and manage users and groups


Add a group in your CentOS server (in my case smbgrp):

1 groupadd smbgrp

Create a new share, set the permission on the share:

1 <strong>cd /samba/</strong>
2 <strong>mkdir secure</strong>
3 <strong>chown -R unixmentest:smbgrp secure/</strong>
4 <strong>ls -l</strong>
5 <strong>chmod -R 0770 secure/</strong>
6 <strong> ls -l</strong>

Add the user to the samba group and create samba password:

1 <strong>usermod -a -G smbgrp unixmentest</strong>


2 <strong> smbpasswd -a unixmentest</strong>

Edit the smb.conf file:

1 <strong>nano /etc/samba/smb.conf</strong>

Add the newly created samba share in smb.conf file:


1 <strong>[Secure]</strong>
2 <strong> path = /samba/secure</strong>
3 <strong> valid users = @smbgrp</strong>
4 <strong> guest ok = no</strong>
5 <strong> writable = yes</strong>
6 <strong> browsable = yes</strong>

Restart the samba service:


- For Centos
1 <strong>service smb restart</strong>
2 <strong>service nmb restart</strong>

http://www.unixmen.com/install-samba-fedora17-centos-6-2/ 3/10
5/26/2014 Install SAMBA on Fedora17 and Centos 6.2 | Unixmen

For Fedora

1 <strong>systemctl restart smb.service</strong>


2 <strong>systemctl restart nmb.service</strong>

Enjoy

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

Share this Article: 0 0 20 0 0 0

0 people like this


CentOS, Fedora, Frequently Asked Questions, Ubuntu

Centosfedora17samba

M.el Khamlichi
Founder of Unixmen , Living in Amsterdam. Netherlands i Have started this project
with non-profit objective. my only target is helping people and guide them to
understand that Bill Gates is not the only one making good things for IT world. Email:
[email protected]

Recommended for you


Centosfedora17CentOSFedora

http://www.unixmen.com/install-samba-fedora17-centos-6-2/ 4/10
5/26/2014 Install SAMBA on Fedora17 and Centos 6.2 | Unixmen

Setup NFS Server On CentOS, RHEL, Scientific Linux 6.5/6.4/6.3

How To Enable Core Dumps In RHEL6

Reset MariaDB Root Password in CentOS 6.4

How to Install Latest GIT on RHEL 6/CentOS 6

RHEL/CentOS 6.4 LDAP MD5 Certificate Error Caused by NSS 3.14 Update

CentOS Dojo UK – July 12, 2013

Advetise here !!!

http://www.unixmen.com/install-samba-fedora17-centos-6-2/ 5/10
5/26/2014 Install SAMBA on Fedora17 and Centos 6.2 | Unixmen

Donate to Unixmen

We need your assistance to stay live and contribute more articles on Unix.

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

Like us on Facebook

Unixmen
Like

40,310 people like Unixmen.

Facebook social plugin

http://www.unixmen.com/install-samba-fedora17-centos-6-2/ 6/10
5/26/2014 Install SAMBA on Fedora17 and Centos 6.2 | Unixmen

Unixmen Latest Tweets

http://www.unixmen.com/install-samba-fedora17-centos-6-2/ 7/10
5/26/2014 Install SAMBA on Fedora17 and Centos 6.2 | Unixmen

Tweets Follow

Unixmen 6h
@unixmen
Setup Backup Server Using Bacula And Webmin On
Ubuntu 14.04: Bacula is an open source network
backup solution ... bit.ly/1hqlAnM
Expand

Unixmen 8h
@unixmen
Install Webmin On Ubuntu 14.04: Webmin is an
open source, web based system administration tool
for Unix/Linux.... bit.ly/1w7jsuI

Unixmen 24 May
@unixmen
Dictionaries vs List data structures In Python:
Suppose you have a following list: [crayon-
5380b04a12558466430... bit.ly/1vXJIaJ
Expand

Unixmen 23 May
@unixmen
Use Special Characters In Python: Sometimes, we
want to add some extra space between two words,
like pressing ... bit.ly/1hfQoYi
Expand

Unixmen 22 May
@unixmen
How to print in the same line using end=’ ‘
argument: The print statement prints by default a
Tweet to @unixmen

Unixmen

Follow +1

+ 7,591

Top 10 Recent Comments


Jakeukalane Milegum Firisse
worked today for me also. It was a problem of the live USB. I did...

Nicky
Worked for me 14.04, 64 bit, LTS

bob
This is a very late reply, but I have been busy. I can't seem to...

http://www.unixmen.com/install-samba-fedora17-centos-6-2/ 8/10
5/26/2014 Install SAMBA on Fedora17 and Centos 6.2 | Unixmen

Bill Randle
Great summary - thanks!

setevoй червь™
Thanks, I know what it is... But I mean exactly "redable", like "more simple
to...

Panos Georgiadis
for the time being I am covering some basics you all need to know in...

Panos Georgiadis
Google for Escape Sequences or follow this link:
https://docs.python.org/2/reference/lexical_analysis.html#string-literals...

setevoй червь™
As for me - second example more readable... But - need more characters,
yes :-)

Maravento
thanks

Panos Georgiadis
1+1=2 is also a solution in a math course. The Coursera course has been
ended...

Favorite Links

News on Free/libre and Open Source software.

LinuxHost: Webdesing, SEO & Internet Marketing.

Ubuntu Linux Tutorials, Howtos, Tips and News.

Unixmen Archives
Select Month
http://www.unixmen.com/install-samba-fedora17-centos-6-2/ 9/10
5/26/2014 Install SAMBA on Fedora17 and Centos 6.2 | Unixmen

Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0


International License.

8288
0
7591
31

android browser Centos Debian Linux linux distribution


Fedora games gaming gnome

LinuxMint lucid lynx news opensource security server software ubuntu


Copyright © 2014 Unixmen, All Rights Reserved.
Website Design and Maintained by Anblik.

http://www.unixmen.com/install-samba-fedora17-centos-6-2/ 10/10

You might also like