Fedora19_Samba安装配制.docx_第1页
Fedora19_Samba安装配制.docx_第2页
Fedora19_Samba安装配制.docx_第3页
Fedora19_Samba安装配制.docx_第4页
Fedora19_Samba安装配制.docx_第5页
已阅读5页,还剩4页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Fedora19下Samba服务安装与配制1. 安装samba服务器Yum install *samba* /自动下载和安装与samba有关的软件。2. 静止防火墙l fedora17及以前的版本关闭防火墙用systemctl stop iptables.service即可,其他linux版本用service stop iptablesfedora18关防火墙:systemctl disable firewalld.service。l 或者在防火墙软件中:允许smb相关的服务。3. 配置Selinux(不能关闭征面的,不然在WIN7打开共享是不能写和打开)setsebool P samba_enable_home_dirs onsetsebool P samba_export_all_ro onsetsebool P samba_export_all_rw on#setsebool P samba_create_home_dirs on/这个要打开,才能写只改这个为start(开服务),restart(重起服务),status(状态)等等我们可以用命令getsebool a | grep samba查看smb相关的是否打开(显示一列表中,出现其他情况可发打开其他的选项)4. 开Smb服务/bin/systemctl restart smb.service5. 配制smb服务(用软件也行,下面是文件添加) # vi /etc/Samba/smb.conf 编辑 Fedora Samba 的配置文件Smb.conf文件中的内容(除去了前面注释)如下 (在最后面加共享文件):#= Global Settings =global# - Network-Related Options -# workgroup = the Windows NT domain name or workgroup name, for example, MYGROUP.# server string = the equivalent of the Windows NT Description field.# netbios name = used to specify a server name that is not tied to the hostname.# interfaces = used to configure Samba to listen on multiple network interfaces.# If you have multiple interfaces, you can use the interfaces = option to# configure which of those interfaces Samba listens on. Never omit the localhost# interface (lo).# hosts allow = the hosts allowed to connect. This option can also be used on a# per-share basis.# hosts deny = the hosts not allowed to connect. This option can also be used on# a per-share basis.#workgroup = mygroupserver string = Samba Server Version %v;netbios name = MYSERVER;interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24;hosts allow = 127. 192.168.12. 192.168.13.# - Logging Options -# log file = specify where log files are written to and how they are split.# max log size = specify the maximum size log files are allowed to reach. Log# files are rotated when they reach the size specified with max log size.# log files split per-machine:log file = /var/log/samba/log.%m# maximum size of 50KB per log file, then rotate:max log size = 50# - Standalone Server Options -# security = the mode Samba runs in. This can be set to user, share# (deprecated), or server (deprecated).# passdb backend = the backend used to store user information in. New# installations should use either tdbsam or ldapsam. No additional configuration# is required for tdbsam. The smbpasswd utility is available for backwards# compatibility.#security = user;passdb backend = tdbsam# - Domain Members Options -# security = must be set to domain or ads.# passdb backend = the backend used to store user information in. New# installations should use either tdbsam or ldapsam. No additional configuration# is required for tdbsam. The smbpasswd utility is available for backwards# compatibility.# realm = only use the realm option when the security = ads option is set.# The realm option specifies the Active Directory realm the host is a part of.# password server = only use this option when the security = server# option is set, or if you cannot use DNS to locate a Domain Controller. The# argument list can include My_PDC_Name, My_BDC_Name, and My_Next_BDC_Name:# password server = My_PDC_Name My_BDC_Name My_Next_BDC_Name# Use password server = * to automatically locate Domain Controllers.;realm = MY_REALM;password server = # - Domain Controller Options -# security = must be set to user for domain controllers.# passdb backend = the backend used to store user information in. New# installations should use either tdbsam or ldapsam. No additional configuration# is required for tdbsam. The smbpasswd utility is available for backwards# compatibility.# domain master = specifies Samba to be the Domain Master Browser, allowing# Samba to collate browse lists between subnets. Do not use the domain master# option if you already have a Windows NT domain controller performing this task.# domain logons = allows Samba to provide a network logon service for Windows# workstations.# logon script = specifies a script to run at login time on the client. These# scripts must be provided in a share named NETLOGON.# logon path = specifies (with a UNC path) where user profiles are stored.#;domain master = yes;domain logons = yes# the following login script name is determined by the machine name# (%m):;logon script = %m.bat# the following login script name is determined by the UNIX user used:;logon script = %u.bat;logon path = %LProfiles%u# use an empty path to disable profile support:;logon path =# various scripts can be used on a domain controller or a stand-alone# machine to add or delete corresponding UNIX accounts:;add user script = /usr/sbin/useradd %u -n -g users;add group script = /usr/sbin/groupadd %g;add machine script = /usr/sbin/useradd -n -c Workstation (%u) -M -d /nohome -s /bin/false %u;delete user script = /usr/sbin/userdel %u;delete user from group script = /usr/sbin/userdel %u %g;delete group script = /usr/sbin/groupdel %g# - Browser Control Options -# local master = when set to no, Samba does not become the master browser on# your network. When set to yes, normal election rules apply.# os level = determines the precedence the server has in master browser# elections. The default value should be reasonable.# preferred master = when set to yes, Samba forces a local browser election at# start up (and gives itself a slightly higher chance of winning the election).#;local master = no;os level = 33;preferred master = yes#- Name Resolution -# This section details the support for the Windows Internet Name Service (WINS).# Note: Samba can be either a WINS server or a WINS client, but not both.# wins support = when set to yes, the NMBD component of Samba enables its WINS# server.# wins server = tells the NMBD component of Samba to be a WINS client.# wins proxy = when set to yes, Samba answers 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.# dns proxy = when set to yes, Samba attempts to resolve NetBIOS names via DNS# nslookups.;wins support = yes;wins server = w.x.y.z;wins proxy = yes;dns proxy = yes# - Printing Options -# The options in this section allow you to configure a non-default printing# system.# load printers = when set you yes, the list of printers is automatically# loaded, rather than setting them up individually.# cups options = allows you to pass options to the CUPS library. Setting this# option to raw, for example, allows you to use drivers on your Windows clients.# printcap name = used to specify an alternative printcap file.#;load printers = yescups options = raw;printcap name = /etc/printcap# obtain a list of printers automatically on UNIX System V systems:;printcap name = lpstat;printing = cups# - File System Options -# The options in this section can be un-commented if the file system supports# extended attributes, and those attributes are enabled (usually via the# user_xattr mount option). These options allow the administrator to specify# that DOS attributes are stored in extended attributes and also make sure that# Samba does not change the permission bits.# Note: These options can be used on a per-share basis. Setting them globally# (in the global section) makes them the default for all shares.;map archive = no;map hidden = no;map read only = no;map system = no;encrypt passwords = yes;guest ok = no;guest account = nobody;store dos attributes = yes#= Share Definitions =homescomment = Home Directoriesbrowseable = nowritable = yes;valid users = %S;valid users = MYDOMAIN%Sprinterscomment = All Printerspath = /var/spool/sambabrowseable = no;guest ok = no;writable = Noprintable = yes# Un-comment the following and create the netlogon directory for Domain Logons:;net

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论