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 Linux Samba Server

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

Today, the editor will show you how to configure the Linux Samba server. The knowledge points in this article are very detailed. Friends who feel helpful can browse the content of the article with the editor, hoping to help more friends who want to solve this problem to find the answer to the problem. Follow the editor to learn more about "how to configure the Linux Samba server".

The Linux system has Samba installed by default, but the Samba service is not installed:

1. Check the installation first: rpm-qa | grep samba

According to the installation of the system, choose to download or install the missing rpm package through the optical drive.

My installation is as follows:

Use the command: mount / dev/cdrom1 / mnt/cdrom1

Mount cdrom1 to the system temporary directory / mnt/cdrom1 through mount and use the command under the Packets package: install the rpm-ivh samba.*.rpm package.

Change to the directory where the rpm file is placed

[root@liangxu] # rpm-ivh samba-common-3.6.9-151.el6.x86_64

This is a necessary program for Samba and must be installed

[root@liangxu] # rpm-ivh samba-3.6.9-151.el6.x86_64

Install the Samba server program to enable my Windows host to access the resources shared by the Samba server.

If you need a Linux host to access shared resources on a Windows host, you should also install the Samba client program.

[root@liangxu] # rpm-ivh samba-client-3.6.9-151.el6.x86_64

2. After installing the rpm package of samba

Samba-common-3.6.9-151.el6.x86_64 / / mainly provides the samba server settings file and settings file syntax checker testparm

Samba-client-3.6.9-151.el6.x86_64 / / client software, which mainly provides the set of tool instructions needed when the linux host is used as the client

Samba-swat-3.6.9-151.el6.x86_64 / / web configuration interface of samba server based on https protocol

Samba-3.6.9-151.el6.x86_64 / / server-side software, mainly provides samba server daemon, shared documents, log rotation, boot default option

When the Samba server is installed, the configuration file directory / etc/samba and other samba executable command tools are generated, / etc/samba/smb.conf is the core configuration file for samba, and / etc/init.d/smb is the startup / shutdown file for samba.

5. Check the startup of samba service.

\ # service smb status

6. Set the boot self-startup

\ # chkconfig-- level 35 smb on / / automatically run the samba service at levels 3 and 5

7. Configure smb service

[global]

Workgroup = WORKGROUP

Server string = Samba Server Version% v

Netbios name = ImgPath05

[ImgPath] comment = Public stuff

Path = / usr/local/nginx/html/img

Public = yes

Writeable = yes

Browseable = yes

Guest ok = yes

The shared directory is: / usr/local/nginx/html/img, and the external name of the shared directory is: ImgPath, which is the directory name seen in Windows.

Set shared directory permissions: chown-R nobody:nobody / usr/local/nginx/html/img/

Start or restart the smb service

Restart the smb service

Test whether the smb.conf configuration is correct

9 Windows accesses the shared directory, but does not have write permission. Modify the firewall settings in the following ways.

Add the Linux smb service to the firewall exception with the root user executing the setup command # setup pop-up. Reboot takes effect. If you don't want to restart, use the command # setenforce 0

Thank you for your reading, the above is the whole content of "how to configure Linux Samba server", learn friends to hurry up to operate it. I believe that the editor will certainly bring you better quality articles. Thank you for your support to the website!

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