Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure samba Service under linux

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to configure samba service under linux, which is very detailed and has certain reference value. Friends who are interested must finish it!

Configure samba service under linux

This article is based on centos6.5

First, download

Yum-y install samba

II. Configuration

Vim / etc/samba/smb.conf

Configuration content

[homes] comment = Home Directories browseable = no writable = yes path = / data/app_info create mode = 0644 force create mode = 0644 directory mode = 0755 force directory mode = 0755; valid users =% S; valid users = MYDOMAIN\% S

3. Create smba login users

Sudo smbpasswd-a username

Note: this username must exist, otherwise it will be reported: Failed to add entry for user 'username'.

After executing the above command, the terminal will be prompted for a password, as follows:

New SMB password:Retype new SMB password:

4. Firewall settings:

Iptables-I RH-Firewall-1-INPUT 5-m state-- state NEW-m tcp-p tcp-- dport 139-j ACCEPTiptables-I RH-Firewall-1-INPUT 5-m state-- state NEW-m tcp-p tcp-- dport 445-j ACCEPTiptables-I RH-Firewall-1-INPUT 5-p udp-m udp-dport 137-j ACCEPTiptables-I RH-Firewall-1-INPUT 5-p udp-m udp-dport 138m ACCEPT

V. windows access

\ 122.92.85.116

Prompt for the user name and password you just set, ok.

The public network wants to be able to access and modify the firewall configuration.

-An INPUT-m state-- state NEW-m udp-p udp-- dport 137j ACCEPT-An INPUT-m state-- state NEW-m udp-p udp-- dport 138j ACCEPT-An INPUT-m state-- state NEW-m udp-p udp-dport 137j ACCEPT-An INPUT-m state-- state NEW-m udp-p udp-dport 138-j ACCEPT-An INPUT-m state-state NEW-m tcp-p tcp-- dport-j ACCEPT-An INPUT-m state-p State-- state NEW-m tcp-p tcp-- dport 445-j ACCEPT#-An INPUT-s 10.0.0.0state 8-p tcp-m state-- state NEW-m tcp-- dport 137-j ACCEPT#-An INPUT-s 10.0.0.0Compact 8-p tcp-m state-- state NEW-m tcp-- dport 138-j ACCEPT#-An INPUT-s 10.0.0.0max 8-p tcp-m state-- state NEW-m tcp-- dport 139 -j ACCEPT#-An INPUT-s 10.0.0.0 ACCEPT#-An INPUT 8-p tcp-m state-- state NEW-m tcp-- dport 445-j ACCEPT

These are all the contents of the article "how to configure samba Services under linux". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report