Build a Samba Shared Server in Linux

Source: Internet
Author: User
Tags server installation and configuration

Build a Samba Shared Server in Linux

Lab requirements:

Configure and access the Samba file sharing service, and configure the Access Users and corresponding permissions.

Tips: Create the shared directory/test and/share, and create the file tf1 (read-only) tf2 (read/write) under/test respectively. Create the file pf1 (read-only) under/share) and pf2 (read/write)

1. Mount the local yum Source

[Root @ localhost/] # mkdir/media/cdrom

[Root @ localhost/] # mount/dev/cdrom/media/cdrom/

[Root @ localhost/] # vim/etc/yum. repos. d/rhel-source.repo

Rhel-source]

Name = Red Hat Enterprise Linux $ releasever-$ basearch-Source

Baseurl = file: // media/cdrom

Enabled = 1

2. Disable Selinux and IPtables.

[Root @ localhost/] # vim/etc/selinux/config // path

[Root @ localhost/] # setenforce 0 // temporarily disable Selinux

[Root @ localhost/] #/etc/init. d/iptables stop // close the Firewall

3. Install the samba Service

[Root @ localhost/] # yum install samba-y

4. Create a shared user

[Root @ localhost/] # smbpasswd-a smb

[Root @ localhost/] # smbpasswd-a smb

5. modify the configuration file

[Root @ localhost/] # vim/etc/samba/smb. conf

Workgroup = WORKGROUP // Win needs to be changed to a Working Group

Server string = Samba Server Version % v

Security = user // you can change it to everyone.

Passdb backend = tdbsam

[Test]

Path =/test

Public = yes

Writeable = yes

Valid users = smb

[Share]

Path =/share

Public = yes

Writeable = yes

Valid users = smb

6. Create local shared directory and File Permissions

[Root @ localhost/] # mkdir/test/share

[Root @ localhost/] # chown-R smb. smb/test // share/

[Root @ localhost test] # touch tp1 tp2

[Root @ localhost test] # chmod 444 tp1

[Root @ localhost test] # chmod 666 tp2

[Root @ localhost test] # echo "111">/test/tp1 // ceshi text

[Root @ localhost test] # echo "222">/test/tp2

[Root @ localhost test] # service smb restart // enable the service test

------------------------------------ Split line ------------------------------------

How to share files with Samba in Ubuntu 14.04

The speed of accessing samba from Ubuntu dual Nic of VMWare Virtual Machine doubles

Add the Samba File Sharing Server to the Windows Server 2003 Domain

Samba installation Configuration

Samba service configuration in CentOS 6.2

Samba Server installation and configuration

How to Build the Win7 + VMware + Fedora18 Samba Server

------------------------------------ Split line ------------------------------------

Samba details: click here
Samba: click here

This article permanently updates the link address:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.