Samba deployment and optimization (sharing directories in our Linux system for download from Windows systems or other Linux servers, etc.)

Source: Internet
Author: User

(1) share a directory for all users to access, but the file can only be read-only mode

Installing Samba services: Yum install-y Samba samba-client

First: Edit the configuration file vim/etc/samba/smb.conf

Modified: Security = Share (default is user, first change to share mode)

Modify Workgroup (change to your computer's own workgroup): Workgroup = Workgroup

Then add a module to the last face:

[HJP]

Comment = Share all

Path =/tmp/sambadir

Browseable = yes is it possible to see it in our workgroup, which is the Network Neighborhood?

Public = yes

writable = no

Start the SMB service after modifying the configuration file:/ETC/INIT.D/SMB start

Finally create a folder to create a file for testing

A. How to log in to Samba under Windows: Start---> Run---> Input://192.168.109.130

B, Linux under How to login Samba:smbclient//192.168.109.130/hjp

C, Linux under How to attach this directory to this client server:

To install a service first: Yum install-y cifs-utils

Mount: Mount-t cifs//192.168.109.130/hjp/opt/

(2) share a directory to all users access, but to enter the user name password to access, the file is readable and writable

A, edit the configuration file: vim/etc/samba/smb.conf

Remove the Hjp module from the front of the mind first

Then change security = user again

Also add a section at the bottom:

[Hjplinux]

Comment = Share for users

Path =/tmp/sambadir

browseable = yes

writable = yes

public = No

And then save the exit

B. Create a Test account: Useradd smbuser1

Create Virtual account: Pdbedit-a Smbuser1

Restart Service:/ETC/INIT.D/SMB restart

C, Windows logon: Run---> Input: \\192.168.109.130\hjplinux

Linux Login: Smbclient-usmbuser1//192.168.109.130/hjplinux

D. Whether the test can be read and writable


This article is from the "7169431" blog, please be sure to keep this source http://7179431.blog.51cto.com/7169431/1877511

Samba deployment and optimization (sharing directories in our Linux system for download from Windows systems or other Linux servers, etc.)

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.