samba config file

Ubuntu上安装配置samba服务 在Ubuntu中安装配置samba共享服务,可以让你在网络上共享文件和打印机。以下是一个相对详细的步骤指南,介绍如何在Ubuntu上安装和配置Samba。 阅读详情
 

#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which
# are not shown in this example
#
# Some options that are often worth tuning have been included as
# commented-out examples in this file.
#  - When such options are commented with ";", the proposed setting
#    differs from the default Samba behaviour
#  - When commented with "#", the proposed setting is the default
#    behaviour of Samba but the option is considered important
#    enough to be mentioned here
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not made any basic syntactic
# errors.
# A well-established practice is to name the original file
# "smb.conf.master" and create the "real" config file with
# testparm -s smb.conf.master >smb.conf
# This minimizes the size of the really used smb.conf file
# which, according to the Samba Team, impacts performance
# However, use this with caution if your smb.conf file contains nested
# "include" statements. See Debian bug #483187 for a case
# where using a master file is not a good idea.
#

#======================= Global Settings =======================

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
 workgroup = WORKGROUP

# server string is the equivalent of the NT Description field
 server string = %h server (Samba, Ubuntu)

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
#   wins support = no

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
;   wins server = w.x.y.z

# This will prevent nmbd to search for NetBIOS names through DNS.
 dns proxy = no

# What naming service and in what order should we use to resolve host names
# to IP addresses
;   name resolve order = lmhosts host wins bcast

#### Networking ####

# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
;   interfaces = 127.0.0.0/8 eth0

# Only bind to the named interfaces and/or networks; you must use the
# 'interfaces' option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself.  However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
;   bind interfaces only = yes

 

#### Debugging/Accounting ####

# This tells Samba to use a separate log file for each machine
# that connects
 log file = /var/log/samba/log.%m

# Cap the size of the individual log files (in KiB).
 max log size = 1000

# If you want Samba to only log through syslog then set the following
# parameter to 'yes'.
#   syslog only = no

# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
 syslog = 0

# Do something sensible when Samba crashes: mail the admin a backtrace
 panic action = /usr/share/samba/panic-action %d


####### Authentication #######

# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
# in the samba-doc package for details.
   security = user

# You may wish to use password encryption.  See the section on
# 'encrypt passwords' in the smb.conf(5) manpage before enabling.
 encrypt passwords = true

# If you are using encrypted passwords, Samba will need to know what
# password database type you are using. 
; passdb backend = tdbsam

 obey pam restrictions = yes

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
 unix password sync = yes

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
# sending the correct chat script for the passwd program in Debian Sarge).
 passwd program = /usr/bin/passwd %u
 passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
 pam password change = yes

# This option controls how unsuccessful authentication attempts are mapped
# to anonymous connections
 map to guest = bad user

########## Domains ###########

# Is this machine able to authenticate users. Both PDC and BDC
# must have this setting enabled. If you are the BDC you must
# change the 'domain master' setting to no
#
;   domain logons = yes
#
# The following setting only takes effect if 'domain logons' is set
# It specifies the location of the user's profile directory
# from the client point of view)
# The following required a [profiles] share to be setup on the
# samba server (see below)
;   logon path = \\%N\profiles\%U
# Another common choice is storing the profile in the user's home directory
# (this is Samba's default)
   logon path = \\%N\%U\profile

# The following setting only takes effect if 'domain logons' is set
# It specifies the location of a user's home directory (from the client
# point of view)
;   logon drive = H:
   logon home = \\%N\%U

# The following setting only takes effect if 'domain logons' is set
# It specifies the script to run during logon. The script must be stored
# in the [netlogon] share
# NOTE: Must be store in 'DOS' file format convention
;   logon script = logon.cmd

# This allows Unix users to be created on the domain controller via the SAMR
# RPC pipe.  The example command creates a user account with a disabled Unix
# password; please adapt to your needs
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u

# This allows machine accounts to be created on the domain controller via the
# SAMR RPC pipe. 
# The following assumes a "machines" group exists on the system
; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u

# This allows Unix groups to be created on the domain controller via the SAMR
# RPC pipe. 
; add group script = /usr/sbin/addgroup --force-badname %g

########## Printing ##########

# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
#   load printers = yes

# lpr(ng) printing. You may wish to override the location of the
# printcap file
;   printing = bsd
;   printcap name = /etc/printcap

# CUPS printing.  See also the cupsaddsmb(8) manpage in the
# cupsys-client package.
; printing = cups
;   printcap name = cups

############ Misc ############

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
;   include = /home/samba/etc/smb.conf.%m

# Most people will find that this option gives better performance.
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
# for details
# You may want to add the following on a Linux system:
#         SO_RCVBUF=8192 SO_SNDBUF=8192
#   socket options = TCP_NODELAY

# The following parameter is useful only if you have the linpopup package
# installed. The samba maintainer and the linpopup maintainer are
# working to ease installation and configuration of linpopup and samba.
;   message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &

# Domain Master specifies Samba to be the Domain Master Browser. If this
# machine will be configured as a BDC (a secondary logon server), you
# must set this to 'no'; otherwise, the default behavior is recommended.
#   domain master = auto

# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
;   idmap uid = 10000-20000
;   idmap gid = 10000-20000
;   template shell = /bin/bash

# The following was the default behaviour in sarge,
# but samba upstream reverted the default because it might induce
# performance issues in large organizations.
# See Debian bug #368251 for some of the consequences of *not*
# having this setting and smb.conf(5) for details.
;   winbind enum groups = yes
;   winbind enum users = yes

# Setup usershare options to enable non-root users to share folders
# with the net usershare command.

# Maximum number of usershare. 0 (default) means that usershare is disabled.
; usershare max shares = 100

# Allow users who've been granted usershare privileges to create
# public shares, not just authenticated ones
 usershare allow guests = yes
 username map = /etc/samba/smbusers

#======================= Share Definitions =======================

# Un-comment the following (and tweak the other settings below to suit)
# to enable the default home directory shares. This will share each
# user's home director as \\server\username
[homes]
   comment = Home Directories
   browseable = yes

# By default, the home directories are exported read-only. Change the
# next parameter to 'no' if you want to be able to write to them.
   read only = no

# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
   create mask = 0750

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
   directory mask = 0750

# By default, \\server\username shares can be connected to by anyone
# with access to the samba server. Un-comment the following parameter
# to make sure that only "username" can connect to \\server\username
# The following parameter makes sure that only "username" can connect
#
# This might need tweaking when using external authentication schemes
   valid users = %S

# Un-comment the following and create the netlogon directory for Domain Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
;   comment = Network Logon Service
;   path = /home/samba/netlogon
;   guest ok = yes
;   read only = yes

# Un-comment the following and create the profiles directory to store
# users profiles (see the "logon path" option above)
# (you need to configure Samba to act as a domain controller too.)
# The path below should be writable by all users so that their
# profile directory may be created the first time they log on
;[profiles]
;   comment = Users profiles
;   path = /home/samba/profiles
;   guest ok = no
;   browseable = no
;   create mask = 0600
;   directory mask = 0700

[printers]
 comment = All Printers
 browseable = no
 path = /var/spool/samba
 printable = yes
; guest ok = no
; read only = yes
 create mask = 0700

# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
 comment = Printer Drivers
 path = /var/lib/samba/printers
; browseable = yes
; read only = yes
; guest ok = no
# Uncomment to allow remote administration of Windows print drivers.
# You may need to replace 'lpadmin' with the name of the group your
# admin users are members of.
# Please note that you also need to set appropriate Unix permissions
# to the drivers directory for these users to have write rights in it
;   write list = root, @lpadmin

# A sample share for sharing your CD-ROM with others.
;[cdrom]
;   comment = Samba server's CD-ROM
;   read only = yes
;   locking = no
;   path = /cdrom
;   guest ok = yes

# The next two parameters show how to auto-mount a CD-ROM when the
# cdrom share is accesed. For this to work /etc/fstab must contain
# an entry like this:
#
#       /dev/scd0   /cdrom  iso9660 defaults,noauto,ro,user   0 0
#
# The CD-ROM gets unmounted automatically after the connection to the
#
# If you don't want to use auto-mounting/unmounting make sure the CD
# is mounted on /cdrom
#
;   preexec = /bin/mount /cdrom
;   postexec = /bin/umount /cdrom

[public]
 path = /home/public
 writeable = yes
 browseable = yes
 guest ok = yes

CentOS 7 搭建samba服务 系统:CentOS 7 selinux:关闭 firewall:打开 需要达到: 1、samba用户不能登录CentOS系统; 2、不允许匿名访问,需要使用指定的用户、用户名和密码; 2.1指定的samba路径:/home/data/,用户名:samba 密码:**; 3、需要可读写 开始: yum安装samba相关的包# yum -y install samba samba-cl 阅读详情

相关推荐

9、Samba配置指南:从基础到实战

本文详细介绍了Samba服务器的配置方法,涵盖基础配置选项如netbios name、server string和workgroup的设置,磁盘共享中path、guest ok、read only等关键参数的使用,并深入讲解了config file、include和copy等高级配置功能。文章还提供了配置流程图、常见问题解决方案、基于用户/组的访问控制策略以及性能优化建议,帮助用户从入门到进阶全面掌握Samba服务的搭建与管理,实现跨平台高效安全的文件共享。

potato的博客 57

[Linux]在Ubuntu中安装samba并且正确配置(详细)

讲述了samba的安装配置与连接以及最基本的错误解决办法。

c858845275的博客 2万+

Centos 7.6 Install Samba 4

Samba是在Linux和UNIX系统上实现SMB协议的一个免费软件,由服务器及客户端程序构成。SMB(Server Messages Block,信息服务块)是一种在局域网上共享文件和打印机的一种通信协议,它为局域网内的不同计算机之间提供文件及打印机等资源的共享服务。SMB协议是客户机/服务器型协议,客户机通过该协议可以访问服务器上的共享文件系统、打印机及其他资源。通过设置“NetBIOS ...

极致,细节 902

Ubuntu安装Samba服务

Samba 是一种用于 Linux 和 Windows 之间文件共享的协议和工具集。它允许在 Linux 系统上创建一个文件共享服务器,使 Windows 计算机能够访问和共享其中的文件和目录。以下是 Samba 共享的一些特点和工作原理的简要介绍:文件共享:通过 Samba,您可以在 Linux 系统上设置共享文件夹,使其在局域网内可被 Windows 计算机访问。这意味着您可以在Linux 和 Windows 之间轻松地共享文件和目录。

qq_43441284的博客 1万+

学习记录——SIMPACK生成轨道谱文件的方法

生成轨道谱文件的方法,可以用于实测轨道谱导入和自制轨道谱导入仿真

weixin_51965897的博客 7819

SAP ABAP ALV表格实战:5分钟搞定单元格下拉框配置(附完整代码)

本文详细介绍了在SAP ABAP开发中如何快速配置ALV表格的单元格下拉框功能,通过5分钟实战教程帮助开发者掌握关键步骤。文章包含完整的ABAP代码示例,涵盖下拉值定义、字段目录配置及ALV控件绑定等核心操作,特别适合需要实现财务系统费用类型选择或采购系统物料分类等场景的开发者参考。

weixin_28331555的博客 113

在Ubuntu中安装和设置samba

1、安装Samba服务2、配置samba2.1 先备份sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak,以防改错,修改配置文件时建议养成备份的好习惯,改错了还能恢复.2.2 sudo vim /etc/samba/smb.conf 修改配置,添加共享,可直接加到文件尾4、添加samba用户添加samba用户,用于其他人或设备认证,这里添加的用户需要在系统账号中存在,否则添加失败。

daa20的专栏 7781

别再让会议变‘回音壁’:手把手教你调优WebRTC的AEC3回声消除(附实战代码)

本文深入解析WebRTC的AEC3回声消除技术,提供从参数调优到声学环境适配的实战指南。通过诊断回声特征、解剖核心参数(如filter.length_blocks和delay_estimate_smoothing)以及应对特殊场景(如密闭空间与开放办公区),帮助开发者有效解决视频会议中的回声问题,提升语音通信质量。附有实战代码和调试工具,适合需要优化实时通信体验的开发者。

weixin_29220405的博客 181

Ubuntu配置Samba服务

在win系统下,win+r输入\你的ip(例如:\192.168.77.131)回车,会出现共享目录。将Linux的共享目录映射到Windows下,选中share这个共享目录,鼠标右键选择映射网络驱动器。sudo smbpasswd -a graysen //graysen 是我的用户名。点击完成后,会弹出登录窗口,输入账号和密码,再点击确定即可进行映射。查看你的虚拟机是否指定共享路径(vmware右键设置)查看Ubuntu的ip,输入ifconfig。前提:已经换好源,不然下载很慢或者不成功。

打不倒的程序猿 8260

VCS的增量和分离编译

vcs的增量和分离编译

yunduor909的博客 3311

AI提示词实战:用EARS语法5步搞定产品需求拆解(附完整案例)

本文详细介绍了如何运用EARS语法将模糊的产品需求进行原子化拆解,转化为清晰、可执行的结构化指令。通过一个完整的自由职业者项目管理工具案例,演示了从原始需求分析到构建增强AI提示词的五步实战流程,帮助产品经理和技术人员实现高效、精准的需求传达与协作。

nokia的博客 1050

Linux系统搭建Samba服务

SMB协议是客户机/服务器型协议,客户机通过该协议可以访问服务器上的共享文件系统、打印机及其他资源。(思考我i们pc上的网上邻居)不同用户访问主机,根据自己的权限可看到或操作相应的资源。 前提条件: 虚拟机设置为桥接模式 ; Samba服务器端:linux系统IP; 确保虚拟机和主机能互ping; 虚拟机和主机的防火墙是否都关闭; 虚拟机和主机是否处于同一网段; ...

qq_41246458的博客 608

vue使用 APlayer+Meting实现音乐播放,支持多平台音乐:网易云、腾讯、虾米、酷狗、百度

  我之前写过一篇博客:使用 APlayer 实现音乐播放器,虽然 APlayer 让我实现了想要的音乐播放器效果,但是音频列表 audio 的音频链接、音频封面、歌词等,是需要自己去补充的。   那么这些数据从哪里来呢?   我昨天有发愁一会儿会儿,也去搜了获取音乐列表的接口,可以发请求去获取数据嘛。   也有瞅见MetingJS,A powerful plugin connect APlayer and Meting,一个连接APlayer和Meting的功能强大的插件,附上GitHub地址:https

小R.的博客 4801

Linux系统中的Samba配置

<br />为了实现windows 和 Linux以及其他操作系统之间的资源共享,软件商推出nfs 和samba两种解决方式。由于市场上缺乏象pc-nfs那样的客户端工具,使得Linux和windows的资源共享变得复杂。Samba的出现解决了这一问题,它以其简洁、实用、灵活配置的特点受到越来越多人们的广泛关注。 <br />Windows利用SMB协议来实现操作系统间文件和打印机共享,而Samba本身具备SMB协议,它实现局域网内和Windows系列计算机的资源共享。 <br />本文就Samba在Lin

梦想的天空 2585

完整复现YOLOv8:包括训练、测试、评估、预测阶段【本文源码已开源,地址在文章末尾】

(这里主要是在colab.research.google.com实现的,本地的配置也是类似的方法)YOLOv8是一种用于目标检测的深度学习算法。主要参考:https://github.com/ultralytics/ultralytics/blob/main/README.zh-CN.md。yolov8的权重:https://github.com/ultralytics/assets/releases。yolov8的文档:https://v8docs.ultralytics.com/

源代码杀手的博客 1万+

损失函数大汇总(五十三)(Boundary Loss附公式推导与代码)

摘要 Boundary Loss是一种针对图像分割任务的新型损失函数,特别适用于高度类别不平衡的细粒度分割场景。与传统的区域型损失(如Dice、交叉熵)不同,它通过计算预测边界与真实边界之间的距离来优化模型,更关注边界精度而非区域重叠。核心思想是利用距离图(distance map)将边界约束转化为区域积分形式,实现端到端训练。具体实现中,损失函数为预测概率与距离图的点积,梯度仅取决于距离图,具有明确的空间引导性。相比区域型损失,Boundary Loss能更好处理小目标、细长结构等边界敏感任务,可与Dic

悦学共鸣,温柔以待,汇聚光芒,共同成长 246

在FreeBSD 6.2下安装Samba

1. Samba 安装-----------------Samba有二进制安装的版本, 也有源代码安装版本. 我用的系统是FreeBSD, Samba的二进制安装并不支持FreeBSD. 所以, 我就选择了源代码安装方式. 我使用的samba版本是 samba-3.0.21a.tar.gz shell> tar zxvf samba-3.0.21a.tar.gzsh

路 1020

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

SAMBA配置(转)

Samba配置文件常用参数详解 一、samba-server 1、安装samba 默认情况下,安装samba-winbind-clients-3.5.4-68.e16.x86_64,samba-3.5.4-68.e16x86_64、samba-client-3.5.4-68.e16.x86_64和samba-common-3.5.4-68.e16.x86_64即可 2、启动SMB服务 S...

王者归来 229

efm32 入门.pdf

本PDF共计22页,介绍的是操作驱动API,下载与否自己斟酌。

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

Samba配置文件常用参数详解

原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://yuanbin.blog.51cto.com/363003/115761 文中有不对或者有不清楚的地方,请大家告诉我,谢谢!Samba配置文件常用参数详解Samba的主配置文件叫smb.conf,默认在/etc/samba/目录下。 smb.conf含有多个段,每个段由段名开始,

heavenluu的专栏 368

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

Ubuntu Server 12.04 配置Samba .

http://blog.csdn.net/marujunyy/article/details/8486310     Samba是Linux中模拟Windows 文件/打印共享的服务器软件,在Linux / Windows 混合网络环境下是非常有用的。 安装Samba devadm@devserver:~$ sudo tasksel 选择 [*]Samba file serve

入凡尘笔录 852

samba配置

Current Config # Samba config file created using SWAT # from 192.168.0.1 (192.168.0.1) # Date: 2010/04/13 14...

congoula3763的博客 213

vmware linux安装samba服务

安装sambar [root@redhatlinux Samba]# rpm -ivh perl-Convert-ASN1-0.20-1.1.noarch.rpm warning: perl-Convert-ASN1-0.20-1.1.noarch.rpm: Header V3 DSA signature: NOKEY,  key ID 37017186 Preparing...

wangfenqin的专栏 563

解决vsftpd:cannot open config file:-l的问题

昨天莫名奇妙suse的vsftpd就起不来了,连接时提示cannot open config file:-l 。在Google上一搜,这个问题一大推,但是没有明确的答案。乱七八糟捣鼓了一天,还是不得行,恼火啊。晚上回去后专门在csdn的blog上搜,搜出来的果然更有质量些。有了一点头绪。我现在的配置是通过xinetd来启动vsftpd。xinetd的配置文件是/etc/xinetd.d/vsftp

wade23的专栏 6597

Docker Samba 安装与配置指南

Docker Samba 安装与配置指南 1. 项目基础介绍 Docker Samba 是一个开源项目,它提供了一个基于 Docker 的 Samba 服务镜像。Samba 是一个开源的 SMB/CIFS 文件服务器,允许Linux与Windows操作系统之间共享文件和打印机。这个项目的主要编程语言是 Python,用于编写 Dockerfile 以及自动化脚本。 2. 项目使用的关键技术和框架 ...

gitblog_00533的博客 892

Linux Samba文件共享服务,安装与案例配置

Samba服务器安装和配置 1:安装Samba服务器软件包 [root@localhost ~]# rpm -qa | grep samba [root@localhost ~]# yum -y install samba [root@localhost ~]# yum -y install samba-client 2:/etc/samba/smb.conf文件详解 [root@localhost ~]# cat /etc/samba/smb.conf # See smb.conf.exam

s13166803785的博客 1186

Centos 6.5下搭建samba-glusterfs

环境说明 硬件环境: vm *2   软件环境: Centos 6.5 glusterfs-3.6.0.29-2.el6.x86_64 samba-glusterfs-3.6.23-12.el6.x86_64 samba-3.6.23-12.el6.x86_64   安装配置 1.更新epel源 #wget http://mirrors.ustc.edu.cn/fedora

bobpen的专栏 3068
上一篇: XRDP:Unable to copy the users Xauthorization file.
下一篇: XML转义
itfront
博客等级 码龄20年 10粉丝 17原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值