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 the installation of Fedora Samba

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Editor to share with you how to configure the installation of Fedora Samba, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Install Fedora Samba

First, install Fedora Samba online through yum.

Yum-y install Fedora Samba

Configure Fedora Samba

Then, configure Fedora Samba according to your requirements by editing / etc/Fedora Samba/smb.conf. Here, the principle of this article is to apply file sharing only to the intranet, and let the directory to be shared have sufficient read and write permissions.

[root@sample ~] # vi / etc/Samba/smb.conf ← edits the configuration file of Fedora Samba

Workgroup = WORKGROUP / / set up the workgroup

Server string =% users Samba% v / / description% U represents the currently logged in user

Netbios name = fedora / / netbios name, fedora9 is not enabled by default

Log file = / var/log/Samba/log.%m / / Log file save path% m your windows hostname

Max log size = 50 / / log * * capacity

Security = user / / Security level, user requires username and password, share level does not

[Fedora Samba] / / create a share named Fedora Samba

Comment = Samba// description information

Path = / home/suyang/Fedora Samba// share path

Public = no / / whether guest users are allowed to access (equivalent to guest ok = yes/no)

Writable = yes / / whether it is writable

Write list = suyang / / list of users that can be written (@ represents user group)

Next, create a private directory that will be shared to the Windows network through Fedora Samba.

[root@sample ~] # mkdir / home/suyang/Samba ← to establish a special directory for shared files

[root@sample] # chown-R nobody. / home/suyang/Samba ← sets the private directory to be nobody

[root@sample ~] # chmod 777 / home/suyang/Samba ← sets the private directory property to 777

Before making a connection to the server, the user used to log in to the Fedora Samba needs to be set up in advance. Here we take the Fedora Samba standard Fedora Samba user database management tool "smbpasswd" in Fedora as an example to create user data for logging in to Fedora Samba. One thing to note here: the premise for creating a user with smbpasswd is that the user exists in the system user-- based on the system user, before the user's information in the Fedora Samba user database can be created.

[root@sample] # smbpasswd-a suyang ← adds the system user suyang (for example) to the Fedora Samba user database

New SMB password: ← enter the password that the user uses to log in to Fedora Samba

Retype new SMB password: ← reconfirms entering the password

Start the Fedora Samba service

Before starting the Fedora Samba service, first open the port used by Fedora Samba in the firewall settings. [root@sample ~] # vi / etc/sysconfig/iptables ← Editing iptables configuration File

-A RH-Firewall-1-INPUT-m state-- state NEW-m tcp-p tcp-- dport 25-j ACCEPT ← find this line and add the following line below:

-A RH-Firewall-1-INPUT-m state-- state NEW-m tcp-p tcp-- dport 139-j ACCEPT

-A RH-Firewall-1-INPUT-m state-- state NEW-m tcp-p tcp-- dport 445-j ACCEPT

-A RH-Firewall-1-INPUT-p udp-m udp-- dport 137-j ACCEPT

-A RH-Firewall-1-INPUT-p udp-m udp-- dport 138j ACCEPT

[root@sample ~] # / etc/rc.d/init.d/iptables restart ← restart iptables to make the new rules effective

Flushing firewall rules: [OK]

Setting chains to policy ACCEPT: filter [OK]

Unloading iptables modules: [OK]

Applying iptables firewall rules: [OK]

* to start the Fedora Samba service (including two daemons: smb,nmb).

[root@sample ~] # chkconfig smb on ← sets Fedora Samba self-startup

[root@sample ~] # chkconfig-- list smb ← confirms the Fedora Samba startup tag and confirms that 2-5 is the status of on

Smb 0:off 1:off 2:on 3:on 4:on 5:on 6:off

[root@sample ~] # chkconfig nmb on ← sets nmb self-startup

[root@sample ~] # chkconfig-- list nmb ← confirms the nmb startup tag and confirms that 2-5 is the status of on

Nmb 0:off 1:off 2:on 3:on 4:on 5:on 6:off

[root@sample ~] # / etc/rc.d/init.d/smb start ← starts the Fedora Samba service

Starting SMB services: [OK]

[root@sample ~] # / etc/rc.d/init.d/nmb start ← starts the nmb service

Starting NMB services: [OK]

The above is all the contents of the article "how to configure and install Fedora Samba". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more 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: 230

*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