⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 smb.conf.5

📁 samba-3.0.22.tar.gz 编译smb服务器的源码
💻 5
📖 第 1 页 / 共 5 页
字号:
.\"Generated by db2man.xsl. Don't modify this, modify the source..de Sh \" Subsection.br.if t .Sp.ne 5.PP\fB\\$1\fR.PP...de Sp \" Vertical space (when we can't use .PP).if t .sp .5v.if n .sp...de Ip \" List item.br.ie \\n(.$>=3 .ne \\$3.el .ne 3.IP "\\$1" \\$2...TH "SMB.CONF" 5 "" "" "".SH NAMEsmb.conf \- The configuration file for the Samba suite.SH "SYNOPSIS".PPThe \fIsmb\&.conf\fR file is a configuration file for the Samba suite\&. \fIsmb\&.conf\fR contains runtime configuration information for the Samba programs\&. The\fIsmb\&.conf\fR file is designed to be configured and administered by the\fBswat\fR(8) program\&. The complete description of the file format and possible parameters held within are here for reference purposes\&..SH "FILE FORMAT".PPThe file consists of sections and parameters\&. A section begins with the name of the section in square brackets and continues until the next section begins\&. Sections contain parameters of the form: .nf\fIname\fR = \fIvalue \fR.fi .PPThe file is line\-based \- that is, each newline\-terminated line represents either a comment, a section name or a parameter\&..PPSection and parameter names are not case sensitive\&..PPOnly the first equals sign in a parameter is significant\&. Whitespace before or after the first equals sign is discarded\&. Leading, trailing and internal whitespace in section and parameter names is irrelevant\&. Leading and trailing whitespace in a parameter value is discarded\&. Internal whitespace within a parameter value is retained verbatim\&..PPAny line beginning with a semicolon (``;'') or a hash (``#'') character is ignored, as are lines containing only whitespace\&..PPAny line ending in a ``\\'' is continued on the next line in the customary UNIX fashion\&..PPThe values following the equals sign in parameters are all either a string (no quotes needed) or a boolean, which may be given as yes/no, 0/1 or true/false\&. Case is not significant in boolean values, but is preserved in string values\&. Some items such as create masks are numeric\&..SH "SECTION DESCRIPTIONS".PPEach section in the configuration file (except for the [global] section) describes a shared resource (known as a ``share'')\&. The section name is the name of the shared resource and the parameters within the section define the shares attributes\&..PPThere are three special sections, [global], [homes] and [printers], which are described under\fBspecial sections\fR\&. The following notes apply to ordinary section descriptions\&..PPA share consists of a directory to which access is being given plus a description of the access rights which are granted to the user of the service\&. Some housekeeping options are also specifiable\&..PPSections are either file share services (used by the client as an extension of their native file systems) or printable services (used by the client to access print services on the host running the server)\&..PPSections may be designated \fBguest\fR services, in which case no password is required to access them\&. A specified UNIX \fBguest account\fR is used to define access privileges in this case\&..PPSections other than guest services will require a password to access them\&. The client provides the username\&. As older clients only provide passwords and not usernames, you may specify a list of usernames to check against the password using the user = option in the share definition\&. For modern clients such as Windows 95/98/ME/NT/2000, this should not be necessary\&..PPThe access rights granted by the server are masked by the access rights granted to the specified or guest UNIX user by the host system\&. The server does not grant more access than the host system grants\&..PPThe following sample section defines a file space share\&. The user has write access to the path \fI/home/bar\fR\&. The share is accessed via the share name foo: .nf	\fI[foo]\fR	path = /home/bar	read only = no.fi .PPThe following sample section defines a printable share\&. The share is read\-only, but printable\&. That is, the only write access permitted is via calls to open, write to and close a spool file\&. The \fBguest ok\fR parameter means access will be permitted as the default guest user (specified elsewhere): .nf	\fI[aprinter]\fR	path = /usr/spool/public	read only = yes	printable = yes	guest ok = yes.fi .SH "SPECIAL SECTIONS".SS "The [global] section".PPParameters in this section apply to the server as a whole, or are defaults for sections that do not specifically define certain items\&. See the notes under PARAMETERS for more information\&..SS "The [homes] section".PPIf a section called [homes] is included in the configuration file, services connecting clients to their home directories can be created on the fly by the server\&..PPWhen the connection request is made, the existing sections are scanned\&. If a match is found, it is used\&. If no match is found, the requested section name is treated as a username and looked up in the local password file\&. If the name exists and the correct password has been given, a share is created by cloning the [homes] section\&..PPSome modifications are then made to the newly created share:.TP 3\(buThe share name is changed from homes to the located username\&..TP\(buIf no path was given, the path is set to the user's home directory\&..LP.PPIf you decide to use a \fBpath =\fR line in your [homes] section, it may be useful to use the %S macro\&. For example: .nf\fBpath = /data/pchome/%S\fR.fi is useful if you have different home directories for your PCs than for UNIX access\&..PPThis is a fast and simple way to give a large number of clients access to their home directories with a minimum of fuss\&..PPA similar process occurs if the requested section name is ``homes'', except that the share name is not changed to that of the requesting user\&. This method of using the [homes] section works well if different users share a client PC\&..PPThe [homes] section can specify all the parameters a normal service section can specify, though some make more sense than others\&. The following is a typical and suitable [homes] section: .nf\fI[homes]\fRread only = no.fi .PPAn important point is that if guest access is specified in the [homes] section, all home directories will be visible to all clients \fBwithout a password\fR\&. In the very unlikely event that this is actually desirable, it is wise to also specify \fBread only access\fR\&..PPThe \fBbrowseable\fR flag for auto home directories will be inherited from the global browseable flag, not the [homes] browseable flag\&. This is useful as it means setting \fBbrowseable = no\fR in the [homes] section will hide the [homes] share but make any auto home directories visible\&..SS "The [printers] section".PPThis section works like [homes], but for printers\&..PPIf a [printers] section occurs in the configuration file, users are able to connect to any printer specified in the local host's printcap file\&..PPWhen a connection request is made, the existing sections are scanned\&. If a match is found, it is used\&. If no match is found, but a [homes] section exists, it is used as described above\&. Otherwise, the requested section name is treated as a printer name and the appropriate printcap file is scanned to see if the requested section name is a valid printer share name\&. If a match is found, a new printer share is created by cloning the [printers] section\&..PPA few modifications are then made to the newly created share:.TP 3\(buThe share name is set to the located printer name.TP\(buIf no printer name was given, the printer name is set to the located printer name.TP\(buIf the share does not permit guest access and no username was given, the username is set to the located printer name\&..LP.PPThe [printers] service MUST be printable \- if you specify otherwise, the server will refuse to load the configuration file\&..PPTypically the path specified is that of a world\-writeable spool directory with the sticky bit set on it\&. A typical [printers] entry looks like this: .nf\fI[printers]\fRpath = /usr/spool/publicguest ok = yesprintable = yes.fi .PPAll aliases given for a printer in the printcap file are legitimate printer names as far as the server is concerned\&. If your printing subsystem doesn't work like that, you will have to set up a pseudo\-printcap\&. This is a file consisting of one or more lines like this: .nfalias|alias|alias|alias\&.\&.\&.    .fi .PPEach alias should be an acceptable printer name for your printing subsystem\&. In the [global] section, specify the new file as your printcap\&. The server will only recognize names found in your pseudo\-printcap, which of course can contain whatever aliases you like\&. The same technique could be used simply to limit access to a subset of your local printers\&..PPAn alias, by the way, is defined as any component of the first entry of a printcap record\&. Records are separated by newlines, components (if there are more than one) are separated by vertical bar symbols (|)\&..RS.Sh "Note".PPOn SYSV systems which use lpstat to determine what printers are defined on the system you may be able to useprintcap name = lpstat to automatically obtain a list of printers\&. See theprintcap name option for more details\&..RE.SH "PARAMETERS".PPParameters define the specific attributes of sections\&..PPSome parameters are specific to the [global] section (e\&.g\&., \fBsecurity\fR)\&. Some parameters are usable in all sections (e\&.g\&., \fBcreate mask\fR)\&. All others are permissible only in normal sections\&. For the purposes of the following descriptions the [homes] and [printers] sections will be considered normal\&. The letter \fBG\fR in parentheses indicates that a parameter is specific to the [global] section\&. The letter \fBS\fR indicates that a parameter can be specified in a service specific section\&. All \fBS\fR parameters can also be specified in the [global] section \- in which case they will define the default behavior for all services\&..PPParameters are arranged here in alphabetical order \- this may not create best bedfellows, but at least you can find them! Where there are synonyms, the preferred synonym is described, others refer to the preferred synonym\&..SH "VARIABLE SUBSTITUTIONS".PPMany of the strings that are settable in the config file can take substitutions\&. For example the option``path = /tmp/%u'' is interpreted as ``path = /tmp/john'' if the user connected with the username john\&..PP

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -