Samba for CentOS 6.4 System File Service

Source: Internet
Author: User

1. Install samba service software in CentOS 6.4 and create a shared directory
[Root @ localhost ~] # Yum install samba-client samba-command samba
[Root @ localhost ~] # Mkdir/home/samba
[Root @ localhost ~] # Chmod o + w/home/samba/-- the Directory allows other users to write data.

2. detailed introduction to the configuration file
[Root @ localhost ~] # Vim/etc/samba/smb. conf
Workgroup = MYGROUP -- server workgroup
Server string = Samba Server Version % v -- service Descriptor
Interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24 -- which Nic is bound
Hosts allow = 127. 192.168.12. 192.168.13. -- which IP segment is allowed to access
Log file =/var/log/samba/log. % m -- log file
Max log size = 50 -- maximum log file size
Security = user -- security Level (user, server, domain)
Passdb backend = tdbsam -- whether the password is encrypted
Comment = All Printers -- directory Descriptor
Path =/var/spool/samba -- shared directory path
Browseable = no -- whether to browse
Guest OK = no -- anonymous user access permission
Writable = no -- whether to write
Printable = yes -- print the output
Valid users = % S -- specify user login
Max connections = 10 -- maximum number of connections
Create mask = 0777 -- permission to create a file

3. Case study: Anonymous Users are allowed to access and have read and write permissions.
[Root @ localhost ~] # Vim/etc/samba/smb. conf
Security = share -- modify this line
[Share] -- Add the following lines
Comment = samba is server
Path =/home/samba
Guest OK = yes

4. Restart the service and test:
[Root @ node1 ~] #/Etc/init. d/smb restart
Shutting down SMB services: [OK]
Starting SMB services: [OK]
[Root @ node1 ~] #/Etc/init. d/nmb restart
Shutting down NMB services: [OK]
Starting NMB services: [OK]
[Root @ node1 ~] # Iptables-I INPUT-p udp -- dport 137-j ACCEPT -- enable packet filtering
[Root @ node1 ~] # Iptables-I INPUT-p udp -- dport 138-j ACCEPT
[Root @ node1 ~] # Iptables-I INPUT-p tcp -- dport 139-j ACCEPT
[Root @ node1 ~] # Iptables-I INPUT-p tcp -- dport 445-j ACCEPT
[Root @ node1 ~] # Setenforce 0 -- disable security context
[Root @ node1 ~] # Smbclient-L localhost -- view the samba shared directory
WARNING: The security = share option is deprecated
Enter root's password:
Domain = [MYGROUP] OS = [Unix] Server = [Samba 3.6.9-151. el6]
Sharename Type Comment
--------------------
Share Disk samba is server
IPC $ IPC Service (Samba Server Version 3.6.9-151. el6)
Domain = [MYGROUP] OS = [Unix] Server = [Samba 3.6.9-151. el6]
Server Comment
----------------
NODE1 Samba Server Version 3.6.9-151. el6
Workgroup Master
----------------
MYGROUP
[Root @ node1 ~] #

Log on to worker SW

Log on to Linux
[Root @ centos ~] # Smbclient-L 2.2.2.27
Password:
Anonymous login successful
Domain = [MYGROUP] OS = [Unix] Server = [Samba 3.6.9-151. el6]
Sharename Type Comment
--------------------
Share Disk samba is server
IPC $ IPC Service (Samba Server Version 3.6.9-151. el6)
Anonymous login successful
Domain = [MYGROUP] OS = [Unix] Server = [Samba 3.6.9-151. el6]
Server Comment
----------------
NODE1 Samba Server Version 3.6.9-151. el6
Workgroup Master
----------------
MSHOME C4J3I3H6LB28VW4
MYGROUP NODE1
WORKGROUP PPM-SERVER
[Root @ centos ~] # Mount-t cifs // 2.2.2.27/share/mnt/
[Root @ centos ~] # Df-TH
Filesystem Type Size Used Avail Use % Mounted on
/Dev/sda2 ext3 11G 3.5G 6.2G 37%/
/Dev/sda1 ext3 510 M 17 M 467 M 4%/boot
Tmpfs 264 M 0 264 M 0%/dev/shm
// 2.2.2.27/share
Cifs 6.9G 6.5G 39 M 100%/mnt

Samba details: click here
Samba: click here

Samba file sharing-heterogeneous Communication

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

How to Build the Win7 + VMware + Fedora18 Samba Server

  • 1
  • 2
  • Next Page

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.