Simple samba Configuration

Source: Internet
Author: User
Simple samba configuration-general Linux technology-Linux technology and application information. For more information, see the following. [I = s] This post was last edited by tiany524

I started to read a lot of samba configurations.
If you just share your local network with windows
Configuration is actually very simple 2 ~ Step 3 is OK.
My samba Server Configuration
1. Install the samba server
First, check whether samba is installed.
# Rpm-qa | grep samba
If yum is not used for installation, it is very convenient

2. Only 6 rows are required for configuration.
2.1 configure the smb. conf file
# Vim/etc/samba/smb. conf
Jump directly to the last line
Insert the following code
[SambaShare] # This name is the shared file name that the user sees in windows.
Comment = samba share-file # comment
Path =/home/smb # directories shared by samba
Browsable = yes # browsing permission
Writeable = yes # Write Permission
Valid users = smb # accessible to users
2.2 set users
# Useradd smb # Add a user. If yes, you do not need
# Smbpasswd-a smb # Set a logon password for smb users
Note that the user here is not a linux Login User. The user name and password required for access in windows
OK

3. Restart the smb server
#/Etc/init. d/smb restart

Access in windows
\ 192.168.1.5
User: smb password entered OK

Pay attention to firewall settings
We know that the ports occupied by smbd are 139 and 445;

[Root @ ~] # Netstat-tlnp | grep smb
Tcp 0 0 0.0.0.0: 139 0.0.0.0: * LISTEN 10639/smbd
Tcp 0 0 0.0.0.0: 445 0.0.0.0: * LISTEN 10639/smbd

If you have a firewall, you must open these two ports. If you do not know how to open it. Maybe you are a newbie like me, or clear firewall rules;

[Root @ localhost ~] # Iptables-F
Or
[Root @ localhost ~] #/Sbin/iptables-F
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.