Samba server configuration (REDHAT6.4)

Source: Internet
Author: User
Tags gpg

One: Ensure network connectivity


[Email protected] ~]# ifconfig eth0

Eth0 Link encap:ethernet HWaddr 00:0c:29:0c:c3:1f

inet addr:192.168.1.120 bcast:192.168.1.255 mask:255.255.255.0

Inet6 ADDR:FE80::20C:29FF:FE0C:C31F/64 Scope:link

Up broadcast RUNNING multicast mtu:1500 metric:1

RX packets:3313 errors:0 dropped:0 overruns:0 frame:0

TX packets:3002 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:1886136 (1.7 mib) TX bytes:1702104 (1.6 MiB)

Interrupt:18 Base address:0x2000


[[Email protected] ~]# service iptables stop//firewall off

[Email protected] ~]# chkconfig iptables off

[Email protected] ~]# Setenforce 0


Two installation of Samba Server package group (local Yum source mode installation)


[[email protected] ~]# MKDIR/WW//Create Folder

[[email protected] ~]# mount/dev/cdrom/ww///Mount CD

Mount:block Device/dev/sr0 is write-protected, mounting read-only

[Email protected] ~]# cd/etc/yum.repos.d/

[[email protected] yum.repos.d]# ls

Rhel-source.repo//edit this configuration file


[Email protected] yum.repos.d]# VI Rhel-source.repo

[Rhel-source]

name=red Hat Enterprise Linux $releasever-$basearch-source

baseurl=file:///ww/the path to the//yum warehouse file

Enabled=1//Enable GPG checksum validation

Gpgcheck=1//Change the 0 here to 1, indicating that local Yum source installation is enabled

Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-redhat-release

[[email protected] yum.repos.d]# yum-y Install samba//installing Samba


Three: Build a shared that can be accessed anonymously


[Email protected] ~]# Cd/etc/samba

[[email protected] samba]# ls

Lmhosts smb.conf Smbusers

[[Email protected] samba]# VI smb.conf//Modify master configuration file

...

101 Security = share//change user to share enable anonymous sharing

...

289 [Benet]

290 comment = Benetbenet

291 Path =/pp/

292 Public = yes

293 writable = yes

...


[[email protected] samba]# chmod 777/pp///To shared folder system permissions 777


[[email protected] samba]# testparm//test configuration file Correctness

Load SMB config files from/etc/samba/smb.conf

Rlimit_max:increasing Rlimit_max (1024x768) to minimum Windows limit (16384)

Processing section "[Homes]"

Processing section "[Printers]"

Warning:the security=share option is deprecated

Loaded Services file OK. This row indicates that there is no error in the configuration file


[[Email protected] samba]# service SMB start//Start Samba server

Start the SMB service: [OK]

[[Email protected] samba]# service NMB start

Start NMB service: [OK]


Test---

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6F/88/wKioL1WfaLXz8DKUAAIDqVlMS8k405.jpg "title=" ua]5g[ 3$}MHLEBE$R30) drd.png "alt=" Wkiol1wfalxz8dkuaaidqvlms8k405.jpg "/>



Four: Build a share that requires user authentication


Create Samba users

[[email protected] ~]# useradd li//Set up Samba users

[Email protected] ~]# pdbedit-a-u li

New Password:

Retype new Password:


[[email protected] ~]# mkdir/opt/mytools//create local test directory

[Email protected] ~]# chmod 777/opt/mytools/


[Email protected] ~]# vi/etc/samba/smb.conf

Security = user changes share to user to enable user security level


Enter in the last line

[Tools]

Comment = can get software tools from here.

Path =/opt/mytools

public = No

Read Only = yes

Valid users = Li

Write list = Hunter



Test-------------

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6F/89/wKioL1WfcoXgKUruAAEDFtb6qbg726.jpg "style=" float: none; "title=" ${]%g3 ' MS (lf_1rtbo_s$f0.png "alt=" Wkiol1wfcoxgkuruaaedftb6qbg726.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6F/8D/wKiom1WfcnfSjbu9AAGyhs9zuYU629.jpg "title=" S%7sex ) fpok{79) 32cleu~d.jpg "alt=" Wkiom1wfcnfsjbu9aagyhs9zuyu629.jpg "/>

This article is from the "Lixiaowei" blog, make sure to keep this source http://itlxw.blog.51cto.com/10197289/1672912

Samba server configuration (REDHAT6.4)

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.