下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Windows与虚拟机linux互访:samba地配置因为在安装时选择了full,所以 Samba 服务器已经安装了,不过要启动 Samba,先要修改/etc/rc.d/rc.samba 地权限,因为默认它不可以执行.1/ 81、如果直接输入 /etc/rc.d/rc.samba start,会提示找不到 /etc/samba/smb.conf ;2、 拷贝一份 smb.conf-sample 为 smb.conf,修改配置如下,我是把整个 linux 目录共享了(修改地地方红色标出;3、使用 smbpasswd -a 增加用户,我增加地是 root,要注意,这个用户跟 slackware 中
2、地 root 用户没有任何关系,它们是两个独立地东东.# This is the main Samba configuration file. You should read the# smb.c onf(5 manual page in order to un dersta nd the opti ons listed# here. Samba has a huge nu mber of con figurable opti ons (perhaps too# many! most of which are not shown in this example# For a step to s
3、tep guide on installing, configuring and using samba,# read the Samba HOWTO Collectio n.# Any line which starts with a 。(semi-co lon 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 en able# NOTE: When e
4、ver you modify this file you should run the comma nd testparm# to check that you have not made any basic syn tactic errors.#= Global Sett ingsglobal# workgroup = NT-Domai n-Name or Workgroup-Name, eg: LINUX2workgroup = MYGROUP# server stri ng is the equivale nt of the NT Descripti on fieldserver str
5、i ng = Samba Server# Security mode. Defines in which mode Samba will operate. PossibleWindows与虚拟机linux互访:samba地配置因为在安装时选择了full,所以 Samba 服务器已经安装了,不过要启动 Samba,先要修改/etc/rc.d/rc.samba 地权限,因为默认它不可以执行.2/ 8# values are share, user, server, domain and ads. Most people will want3/ 8# user level security. See
6、 the HOWTO Collectio n for details.security = user# This option is important for security. It allows you to restrict# conn ecti ons to mach ines which are on your local n etwork. The# followi ng example restricts access to two C class n etworks and# the loopback in terface. For more examples of the
7、syn tax see# the smb.c onf man page# hosts allow = 192.168.1.100# If you want to automatically load your printer list rather# tha n sett ing them up in dividually the n youll n eed thisload prin ters = yes# you may wish to override the location of the printcap file。 prin tcap n ame = /etc/pri ntcap#
8、 on SystemV system sett ing prin tcap n ame to lpstat should allow# you to automatically obtain a printer list from the SystemV spool# system。prin tcap n ame = lpstat# It should not be n ecessary to specify the print system type uni ess# it is non-standard. Currently supported print systems include:
9、# bsd, cups, sysv, plp, lpr ng, aix, hpux, qnx。prin ti ng = cups# Un comme nt this if you want a guest acco unt, you must add this to /etc/passwd# otherwise the user nobody is used。guest acco unt = pcguest# this tells Samba to use a separate log file for each mach ine# that conn ectslog file = /var/
10、log/samba.%m# Put a capp ing on the size of the log files (in Kb.max log size = 504/ 8# Use password server opti on only with security = server# The argume nt list may in elude:#password server = My_PDC_Name My_BDC_Name My_Next_BDC_Name# or to auto-locate the doma in con troller/s#password server =
11、*。 password server = # Use the realm option only with security = ads# Specifies the Active Directory realm the host is part of。realm = MY_REALM# Backe nd to store user in formati on in. New in stallati ons should# use either tdbsam or ldapsam. smbpasswd is available for backwards# compatibility. tdb
12、sam requires no further con figurati on.。passdb backe nd = tdbsam# 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 mach ine that is connecting.# Note: Consider carefully the location in the configuration
13、 file of#this line. The in cluded file is read at that point.。in clude = /usr/local/samba/lib/smb.c on f.%m# Most people will find that this option gives better performanee.# See the chapter Samba performa nee issues in the Samba HOWTO Collect ion# and the manual pages for details.# You may want to
14、add the following on a Linux system:#SO_RCVBUF=8192 SO_SNDBUF=8192socket opti ons = TCP_NODELAY# Con figure Samba to use multiple in terfaces# If you have multiple n etwork in terfaces the n you must list them# here. See the man page for details.。in terfaces = 192.168.12.2/24 192.168.13.2/24# Browse
15、r Con trol Opti ons:# set local master to no if you dont want Samba to become a master5/ 8# browser on your n etwork. Otherwise the no rmal electio n rules apply。 local master = no# OS Level determ ines the precede nee of this server in master browser# electi ons. The default value should be reas on
16、 able。os level = 33# Domai n Master specifies Samba to be the Domai n Master Browser. This# allows Samba to collate browse lists betwee n sub nets. Dont use this# if you already have a Win dows NT doma in con troller doing this job。doma in master = yes# Preferred Master causes Samba to force a local
17、 browser elect ion on startup# and gives it a slightly higher cha nee of winning the electi on。preferred master = yes# En able this if you want Samba to be a doma in log on server for# Win dows95 workstati ons.。doma in log ons = yes# if you en able doma in logo ns the n you may want a per-mach ine o
18、r# per user logo n script# run a specific logon batch file per workstation (machine。logo n script = %m.bat# run a specific logo n batch file per user name。logo n script = %U.bat# Where to store rovi ng profiles (only for Win95 and WinNT#%L substitutes for this servers n etbios n ame, %U is user name
19、#You must un comme nt the Profiles share below。logo n path = L/Profiles/%U# Win dows Internet Name Servi ng Support Secti on:# WINS Support - Tells the NMBD compo nent of Samba to en able its WINS Server。 wins support = yes# WINS Server - Tells the NMBD compo nents of Samba to be a WINS Clie nt# Not
20、e: Samba can be either a WINS Server, or a WINS Clie nt, but NOT both。 wins server = w.x.y.z6/ 8# 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
21、 = yes# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names# via DNS nslookups. The default is NO.dns proxy = no# These scripts are used on a doma in con troller or sta nd-al one# mach ine to add or delete corresp onding unix acco unts。add user script = /usr/sb in/useradd %u。add g
22、roup script = /usr/sb in /groupadd %g。add mach ine script = /usr/sb in/adduser -n -g machi nes -c Mach ine -d /dev/ null -s/bin /false %u。delete user script = /usr/sb in/userdel %u。delete user from group script = /usr/sb in/deluser %u %g。delete group script = /usr/sb in /groupdel %g#= Share Defin it
23、i onshomescomme nt = Home Directoriesbrowseable = nowritable = yes# Un-comme nt the followi ng and create the n etlogo n directory for Domai n Logo ns。netlogon。comme nt = Network Logo n Service。path = /usr/local/samba/lib/netlogo n。 guest ok = yes。 writable = no。 share modes = no# Un-comment the fol
24、lowing to provide a specific roving profile share7/ 8# the default is to use the users home directory。Profiles。path = /usr/local/samba/profiles。browseable = no。guest ok = yes# NOTE: If you have a BSD-style print system there is no need to# specifically defi ne each in dividual prin terpri nterscomme
25、 nt = All Prin terspath = /var/spool/sambabrowseable = no# Set public = yes to allow user guest acco un t to printguest ok = nowritable = noprin table = yes# This one is useful for people to share files。tmp。comme nt = Temporary file space。path = /tmp。read only = no。public = yes# A publicly accessibl
26、e directory, but read only, except for people in# the staff grouppubliccomme nt = Publicpath = /*共享给本地地目录 */public = yeswritable = yesvalid users = root# Other examples.#8/ 8# A private printer, usable only by fred. Spool data will be placed in freds# home directory. Note that fred must have write a
27、ccess to the spool directory,# wherever it is.。fredsprn。 comme nt = Freds Prin ter。valid users = fred。path = /homes/fred。prin ter = freds_pri nter。public = no。writable = no。prin table = yes# A private directory, usable only by fred. Note that fred requires write# access to the directory.。fredsdir。co
28、mme nt = Freds Service。path = /usr/somewhere/private。valid users = fred。public = no。writable = yes。prin table = no# a service which has a differe nt directory for each mach ine that conn ects# this allows you to tailor configurations to incoming machines. You could# also use the %U opti on to tailor it by user n ame.# The %m gets replaced with the machine name that is connecting.。pchome。comme nt = PC Directories。path = /usr/pc/%m。public = no。 writable = yes# A publicly accessible dir
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025浙江绍兴市和元建设有限公司招聘笔试历年常考点试题专练附带答案详解
- 2025浙江宁波慈溪市四海资产经营公司公开招聘5人考试历年常考点+创新题答案详解
- 2025河南省大河控股有限公司所管企业第二批社会招聘2人笔试历年难易错考点试卷带答案解析
- 2025山东莱州经济开发区城发投资有限公司招聘6人笔试历年备考题库附带答案详解
- 2025安徽蚌埠市固镇县国有资本投资运营(集团)有限公司及子公司招聘16人笔试历年常考点试题专练附带答案详解
- 2025吉林森工开发建设集团有限公司招聘考试历年常考点+创新题答案详解
- 2025中国建筑股份有限公司岗位招聘1人(审计部)笔试历年常考点试题专练附带答案详解
- 事业单位综合能力c测试题及答案解析
- 2026湖北恩施州宣恩县红十字会招聘公益性岗位人员1人参考题库及参考答案详解(黄金题型)
- 2026内蒙古呼伦贝尔市机关事务服务中心竞争性比选2人(7-7)笔试题库含完整答案详解(各地真题)
- 2026年维修钳工高级技师(一级)职业技能鉴定考试题库
- 新疆巴音郭楞蒙古自治州库尔勒市公安辅警招聘知识考试题库附答案
- 2026四川宜宾酒股份有限公司下属子公司第一批员工招聘9人笔试历年参考题库附带答案详解
- (2026版)新版《自然保护区条例》解读课件
- 2025山西华阳集团井下技能操作人员招聘拟录用笔试历年典型考点题库附带答案详解
- 肩关节腔注射技术
- 2026年四川发展控股有限责任公司招聘笔试题
- 小鹏销售话术
- 电瓶车消防制度规范
- 旧路改造水稳层再生利用施工方案
- 护理传染病防控策略
评论
0/150
提交评论