游乐游手机版
首页/系统平台/文章详情

在Fedora Linux 8系统上配置SAMBA服务器的完整教程

时间:2026-06-22 11:23
首先,通过 yum 安装 Samba 是最直接且高效的初始步骤。 yum install samba 安装完成后,配置文件位于 etc samba smb conf。接下来,您需要手动编辑该文件,并将以下配置内容粘贴进去——请注意,大部分注释仅为说明,核心参数已在下方明确标注。 ========

首先,通过 yum 安装 Samba 是最直接且高效的初始步骤。

yum install samba

安装完成后,配置文件位于 /etc/samba/smb.conf。接下来,您需要手动编辑该文件,并将以下配置内容粘贴进去——请注意,大部分注释仅为说明,核心参数已在下方明确标注。

#======================= Global Settings =====================================
[global]

# ----------------------- Netwrok Related Options -------------------------
#
# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
#
# server string is the equivalent of the NT Description field
#
# netbios name can be used to specify a server name not tied to the hostname
#
# Interfaces lets you configure Samba to use multiple interfaces
# If you ha ve multiple network interfaces then you can list the ones
# you want to listen on (never omit localhost)
#
# Hosts Allow/Hosts Deny lets you-restrict who can connect, and you can
# specifiy it as a per share option as well
#
workgroup = robin
server string = MYSERVER
netbios name = MYSERVER
; hosts allow = 127. 192.168.

# --------------------------- Logging Options -----------------------------
#
# Log File let you specify where to put logs and how to split them up.
#
# Max Log Size let you specify the max size log files should reach
# logs split per machine
log file = /var/log/samba/log.%m
# max 50KB per log file, then rotate
max log size = 50

# ----------------------- Standalone Server Options ------------------------
#
# Scurity can be set to user, share(deprecated) or server(deprecated)
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is a vailable for backwards
# compatibility. tdbsam requires no further configuration.
security = share
; encrypt passwords = yes
guest ok = yes
guest account = root

#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
writable = yes
; valid users = %S
; valid users = MYDOMAIN\%S

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
; guest ok = no
; writable = No
printable = yes

# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
; comment = Network Logon Service
; path = /var/lib/samba/netlogon
; guest ok = yes
; writable = no
; share modes = no

# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
; [Profiles]
; path = /var/lib/samba/profiles
; browseable = no
; guest ok = yes

# A publicly accessible directory, but read only, except for people in
# the "staff" group
; [public]
; comment = Public Stuff
; path = /home/samba
; public = yes
; writable = yes
; printable = no
; write list = +staff

[temp]
path = /root/temp
writeable = yes
; browseable = yes
guest ok = yes

配置修改完毕后,请重启 Samba 服务以使新配置生效:

/etc/init.d/smb restart

至此,配置完成。您可以开始使用 Samba 服务进行文件共享了。

补充一点:Fedora Core 从 V2 版本起便默认预装了 SELinux。如果您不打算对其进行详细配置,最简单的方式是将其临时关闭。具体操作是,编辑 /etc/selinux/config 文件,将 SELINUX="" 的值修改为 disabled,随后重启系统使更改生效。

来源:https://www.jb51.net/os/Fedora/1370.html
上一篇Fedora 8系统下XMMS音频播放器正确安装方法详细教程 下一篇Linux系统RPM软件包安装实用技巧
本站内容用于信息整理与展示,如有侵权或内容问题请及时联系处理。

相关推荐

补充同频道和同主题内容,方便继续浏览更多相关内容。

同类最新

继续查看同栏目最近更新的文章。

更多
微软详解Win11时间点还原 默认每24小时创建恢复点
系统平台 · 2026-06-30

微软详解Win11时间点还原 默认每24小时创建恢复点

微软今日推送了最新的 6 月可选更新,并发布博客详细解读了 Win11 全新的“时间点还原”(Point-in-time restore)功能——这一功能本质上是对系统恢复体验的一次全面升级,旨在让用户更轻松地应对电脑故障。 微软表示,面向 Windows 11 客户端用户的“时间点还原”功能现已正

Win11 26H1六月可选更新KB5095091 优化放大镜改善装机体验
系统平台 · 2026-06-30

Win11 26H1六月可选更新KB5095091 优化放大镜改善装机体验

微软今天推送了Windows 11 26H1设备的6月可选更新KB5095091,安装完成后系统版本号会升级到Build 28000 2340。值得一提的是,这次更新并非面向所有设备,而是专门为搭载高通骁龙X2系列芯片的机型准备的——包括骁龙X2 Plus、X2 Elite和X2 Elite Ext

Win11六月可选更新KB5095093修复回收站弹窗异常
系统平台 · 2026-06-30

Win11六月可选更新KB5095093修复回收站弹窗异常

微软已悄然推送Windows 11六月可选更新,编号KB5095093。本次更新覆盖两个版本:24H2用户安装后版本号升级至Build 26100 8737,而25H2用户则更新至Build 26200 8737。 本次更新并非仅是小修小补,而是带来了多项实质性新功能。下面我们就来详细解析这些更新内

苹果macOS 27 Beta2封堵Siri AI跳过候补名单漏洞
系统平台 · 2026-06-30

苹果macOS 27 Beta2封堵Siri AI跳过候补名单漏洞

科技媒体 Cult of Mac 昨日(6月23日)发布博文指出,苹果在 macOS 27 Beta 2 更新中悄然封堵了一个此前可用的后门——用户曾能通过一条终端命令绕过候补名单,直接启用新版 Siri AI,如今这一方法已失效。 简要回顾一下:在 macOS 27 Beta 1 阶段,只需在 M

微软加速Win11 25H2推送 覆盖所有符合条件家用PC
系统平台 · 2026-06-30

微软加速Win11 25H2推送 覆盖所有符合条件家用PC

近日(6月23日),科技媒体 Windows Latest 发布了一则值得关注的动态:微软已进一步扩大 Windows 11 25H2 的推送范围,所有满足硬件要求、且不受 IT 部门管理的家庭版和专业版设备,现在均可顺利接收本次更新。 此次升级有一个显著特点——采用“启用包”(eKB)方式进行推送