问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

linux高手进 samba问题 在线等!

发布网友 发布时间:2022-04-12 09:57

我来回答

3个回答

热心网友 时间:2022-04-12 11:26

都是文本文件,到网上找找,复制粘贴一下,再自己改改。

以下是我的文件:
/etc/samba/lmhosts
127.0.0.1 localhost
==========分隔线==========

/etc/samba/smb.conf
# 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 (perhaps too
# many!) most of which are not shown in this example
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentry and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command "testparm"
# to check that you have not made any basic syntactic errors.
#
#======================= Global Settings =====================================
[global]
dos charset = CP936
unix charset = GBK
display charset = CP936
# workgroup = NT-Domain-Name or Workgroup-Name
workgroup = WORKGROUP

netbios name = TFW-ML201-DT

# server string is the equivalent of the NT Description field
server string = Magic Linux Desktop

# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
; hosts allow = 192.168.1. 192.168.2. 127.

# if you want to automatically load your printer list rather
# than setting them up indivially then you'll need this
printcap name = /etc/printcap

# It should not be necessary to spell out the print system type unless
# yours is non-standard. Currently supported print systems include:
# bsd, sysv, plp, lprng, aix, hpux, qnx
; printing = cups

# This option tells cups that the data has already been rasterized
cups options = raw

# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
guest account = root

# this tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/%m.log
# all log information in one file
# log file = /var/log/samba/log.smbd

# Put a capping on the size of the log files (in Kb).
max log size = 50

# Security mode. Most people will want user level security. See
# security_level.txt for details.
security = share
# Use password server option only with security = server
; password server = <NT-Server-Name>

# Password Level allows matching of _n_ characters of the password for
# all combinations of upper and lower case.
; password level = 8
; username level = 8

# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
; encrypt passwords = yes
; smb passwd file = /etc/samba/smbpasswd

# The following are needed to allow password changing from Windows to
# update the Linux system password also.
# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
# NOTE2: You do NOT need these to allow workstations to change only
# the encrypted SMB passwords. They allow the Unix password
# to be kept in sync with the SMB password.
; unix password sync = Yes
; passwd program = /usr/bin/passwd %u
; passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*

# Unix users can map to different SMB User names
; username map = /etc/samba/smbusers

# 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 = /etc/samba/smb.conf.%m

# Most people will find that this option gives better performance.
# See speed.txt and the manual pages for details
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
; interfaces = 192.168.12.2/24 192.168.13.2/24

# Configure remote browse list synchronisation here
# request announcement to, or browse list sync from:
# a specific host or from / to a whole subnet (see below)
; remote browse sync = 192.168.3.25 192.168.5.255
# Cause this host to announce itself to local subnets here
; remote announce = 192.168.1.255 192.168.2.44

# Browser Control Options:
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
; local master = no

# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
; os level = 33

# Domain Master specifies Samba to be the Domain Master Browser. This
# allows Samba to collate browse lists between subnets. Don't use this
# if you already have a Windows NT domain controller doing this job
; domain master = yes

# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
; preferred master = yes

# Enable this if you want Samba to be a domain logon server for
# Windows95 workstations.
; domain logons = yes

# if you enable domain logons then you may want a per-machine or
# per user logon script
# run a specific logon batch file per workstation (machine)
; logon script = %m.bat
# run a specific logon batch file per username
; logon script = %U.bat

# Where to store roving profiles (only for Win95 and WinNT)
# %L substitutes for this servers netbios name, %U is username
# You must uncomment the [Profiles] share below
; logon path = \\%L\Profiles\%U

# All NetBIOS names must be resolved to IP Addresses
# 'Name Resolve Order' allows the named resolution mechanism to be specified
# the default order is "host lmhosts wins bcast". "host" means use the unix
# system gethostbyname() function call that will use either /etc/hosts OR
# DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf
# and the /etc/resolv.conf file. "host" therefore is system configuration
# dependant. This parameter is most often of use to prevent DNS lookups
# in order to resolve NetBIOS names to IP Addresses. Use with care!
# The example below excludes use of name resolution for machines that are NOT
# on the local network segment
# - OR - are not deliberately to be known via lmhosts or via WINS.
; name resolve order = wins lmhosts bcast

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
; wins support = yes

# 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

# WINS Proxy - Tells Samba to answer name resolution queries on
# behalf of a non WINS capable client, for this to work there must be
# at least one WINS Server on the network. The default is NO.
; wins proxy = yes

# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The built-in default for versions 1.9.17 is yes,
# this has been changed in version 1.9.18 to no.
dns proxy = no

# Case Preservation can be handy - system default is _no_
# NOTE: These can be set on a per share basis
; preserve case = no
; short preserve case = no
# Default case is normally upper case for all DOS files
; default case = lower
# Be very careful with case sensitivity - it can break things!
; case sensitive = no

#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
read only = no

# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
; comment = Network Logon Service
; path = /home/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 = /home/profiles
; browseable = no
; guest ok = yes

# NOTE: If you have a BSD-style print system there is no need to
# specifically define each indivial printer
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
# Set public = yes to allow user 'guest account' to print
guest ok = no
printable = yes

#[TMP_PROJ]
#path = /home/typhoon/123
#guest ok = yes
#writeable = yes

#[BOSS]
#path = /opt/switch/boss
#guest ok = yes
#writeable = no

[FREE]
path = /opt/store_2/free
guest ok = yes
writeable = yes

[MEDIA]
path = /opt/store/media
guest ok = yes
writeable = no

[SOFT]
path = /opt/store/soft
guest ok = yes
writeable = no

[WALLPAPERS]
path = /opt/store/wallpapers
guest ok = yes
writeable = no

[WORK]
path = /opt/store/work
guest ok = yes
writeable = no
==========分隔线==========

/etc/samba/smbpasswd
root:0:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[DU ]:LCT-00000000:
==========分隔线==========

/etc/samba/smbusers
# Unix_name = SMB_name1 SMB_name2 ...
root = administrator admin
nobody = guest pcguest smbguest
==========分隔线==========

热心网友 时间:2022-04-12 12:44

重新找个samba 的源rpm 包装一个。

用这个命令 rpm -ivh --force --nodeps samba****.rpm

祝你好晕。

热心网友 时间:2022-04-12 14:19

这锅有点诡异,建议找个另外一个linux系统中的配置文件拷一下
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
求助:补全成语. _然而止、_然不屈、_然四顾、_然若失、_然而至、_然拒绝、_然无声... 我姑妈(姑妈去世),现奶奶的房产 姑妈的女儿有继承权吗? 丈夫去世遗产应该能怎么分配 《人世间》骆士宾遗产股权归谁所有 为什么说曹珊不应该得罪水自流_百 ... 有谁知我国十大元帅及十大上将? 解放中国的10大元帅是那几个? 对中国有何影响? 中国历史上的十大元帅 为什么中国过去有元帅现在没有了 ...想看中国80年代、90年代热播的电视剧,《渴望》、《蛙女》等,越多... 新申请的被封了,怎么才能解封? qq和微信被风控了,怎么收钱 我的微信一直被风控了 这种情况要多久才能消失 微信恢复正常状态_百度问一问 三夏是指是指哪几个节气 LOL日服安装要不要改电脑IP? 想玩韩服LOL,怎么修改成韩国IP DNS 那些东西 想买途锐3.6v6顶级版不知性能怎么样? 2020款大众途锐锐享版3.0T V6涡轮增压发动机怎么样? 求大众途锐V6发动机资料及技术参数 途锐V6+TSI是什么意思 途锐有十二个缸的嘛? 途锐后面的v6什么意思 大众途锐v6发动机故障码是缸组1-传感器2是怎么分的? 大众途锐V6发动机哪边是1列 面朝发动机 途锐3.0哪一面是一缸?谢谢 途锐6缸发动机2缸在哪里 touareg v6途锐气缸怎么排序 途锐v6右边一排是一二三缸吗 凡尔赛行为指什么 年轻人称郑渊洁为冲浪达人,郑渊洁的作品为何能够具有长久的生命力? 哪里能买到琪雅正品化妆品 济南市琪雅化妆品专卖店在哪儿? 《金融怪杰:华尔街的顶级交易员(典藏版)》pdf下载在线阅读,求百度网盘云资源 琪雅的美容化妆品怎么样? 如何评价《金融怪杰》作者杰克·施瓦格? 琪雅化妆品到底怎么样? 《金融怪杰华尔街的顶级交易员》epub下载在线阅读,求百度网盘云资源 琪雅化妆品怎么样 琪雅化妆品 求金融怪杰三部曲txt的,网上找不到txt的都说pdf的手机不好看 琪雅护肤品怎么样? 琪雅牌子的化妆品好用吗? 美白效果怎么样? 如何炒股?怎样才能快速懂得股票? 琪雅化妆品好吗?用起来效果怎么样? 琪雅化妆品会致癌吗 琪雅化妆品折扣店 讯飞口语的账号和密码都忘了怎么办? 好多人没听过琪雅护肤品 琪雅化妆品是直销模式吗 琪雅化妆品适合哪个年龄段的人用?