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 build a complete samba server in Linux

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "how to build a complete samba server in Linux". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to build a complete samba server in Linux".

Introduction to smb Servic

Later, Microsoft made major changes to this development, and this changed version is also the most common version. Microsoft combines the smb protocol with the network management program it developed with 3com, and continues to add new features to windows for workgroups and later versions of windows.

Smb was originally designed to run on the netbios protocol (while netbios itself runs on netbeui, ipx/spx, or tcp/ip protocols), windows 2000 introduces the ability of smb to run directly on tcp/ip. Here we must distinguish between the smb protocol and the smb service running on the protocol, as well as the netbios service and the dce/rpc service using smb as the authentication tunnel. In addition, we need to distinguish between "network neighbor" protocols that mainly (but not just) directly use netbios datagrams.

In 1996, when sun launched webnfs, Microsoft proposed to rename smb to common internet file system [2]. In addition, Microsoft has added many new features, such as symbolic links, hard links, and increasing the size of files. Microsoft is also trying to support direct contact without relying on netbios, but this attempt is still in the experimental stage and needs to be improved. Microsoft proposed a partial definition to the Internet Engineering working Group as an Internet draft [3]. But these proposals are now out of date.

Because of the importance of the smb protocol when communicating with the dominant microsoft windows platform, and the current smb protocol used by the platform has changed greatly from the original version, the samba project was created to reverse engineer to provide a free software compatible with smb software, so that it can be used by non-Microsoft operating systems.

Microsoft launched server message block 2.0 in windows vista.

[1] before installation, make sure

(1) Firewall is off: use command

# systemctl stop iptables.service

If there is an error warning "failed to stop iptables.service: unit iptables.service not loaded." It means that a firewall has not been installed.

(1-1) install firewall: (out of question: cannot connect to the Internet during installation, there is a prompt network is unreachable, network service network restart needs to be restarted)

Use instructions:

# yum install iptables-services

Set up after installation

# systemctl stop iptables

(2) close selinux (check selinux status: # getenforce)

(2-1) Edit profile

Vi / etc/sysconfig/selinux, change the line inside to selinux=disabled

(2-2) use the setenforce command to set a temporary shutdown

Setenforce 0

[2] install samba

Yum install samba samba-client samba-swat

Check the installation: rpm-qa | grep samba

When the samba server is installed, the configuration file directory / etc/samba and other samba executable command tools are generated

(1) / etc/samba/smb.conf is the core configuration file of samba

(2) / etc/init.d/smb is the startup / shutdown file of samba

[3] configure file smb.conf and create user

(3-1) configuration (add [tmp] configuration information under share definitions)

(3-2) create a user (e.g. Create a user with a user name of apache)

# smbpasswd-an apache

After modification, restart samba, turn off the firewall, and increase user rights, otherwise files and folders cannot be created in the shared directory

[4] windows maps linux

Open my computer-> Map Network Drive-> enter "\ virtual machine ip mp" in the folder bar (tmp is the folder set in the configuration file)-> fill in the created samba username and password in the pop-up window-> enter the shared directory (where the shared directory is the html directory under www)

* there may be a "windows cannot access\ ip addr\ tmp" error, that is, windows cannot access the virtual machine system

Click Diagnostics to view the problem, showing that the virtual machine is not responding

The firewall of the virtual machine may not be turned off successfully, use the following instructions

# systemctl stop firewalld.service

Thank you for reading, the above is the content of "how to build a complete samba server in Linux". After the study of this article, I believe you have a deeper understanding of how to build a complete samba server in Linux. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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

Development

Wechat

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

12
Report