diff options
Diffstat (limited to 'docs/htmldocs/install.html')
-rw-r--r-- | docs/htmldocs/install.html | 795 |
1 files changed, 531 insertions, 264 deletions
diff --git a/docs/htmldocs/install.html b/docs/htmldocs/install.html index cf6bf1f199..0ba79dbe26 100644 --- a/docs/htmldocs/install.html +++ b/docs/htmldocs/install.html @@ -5,7 +5,8 @@ >How to Install and Test SAMBA</TITLE ><META NAME="GENERATOR" -CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK +CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+ +"><LINK REL="HOME" TITLE="SAMBA Project Documentation" HREF="samba-howto-collection.html"><LINK @@ -13,11 +14,11 @@ REL="UP" TITLE="General installation" HREF="introduction.html"><LINK REL="PREVIOUS" -TITLE="Introduction to Samba" -HREF="introsmb.html"><LINK +TITLE="General installation" +HREF="introduction.html"><LINK REL="NEXT" -TITLE="Quick Cross Subnet Browsing / Cross Workgroup Browsing guide" -HREF="browsing-quick.html"></HEAD +TITLE="Improved browsing in samba" +HREF="improved-browsing.html"></HEAD ><BODY CLASS="CHAPTER" BGCOLOR="#FFFFFF" @@ -45,7 +46,7 @@ WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A -HREF="introsmb.html" +HREF="introduction.html" ACCESSKEY="P" >Prev</A ></TD @@ -59,7 +60,7 @@ WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A -HREF="browsing-quick.html" +HREF="improved-browsing.html" ACCESSKEY="N" >Next</A ></TD @@ -72,137 +73,165 @@ WIDTH="100%"></DIV CLASS="CHAPTER" ><H1 ><A -NAME="INSTALL" -></A ->Chapter 2. How to Install and Test SAMBA</H1 +NAME="INSTALL">Chapter 1. How to Install and Test SAMBA</H1 ><DIV -CLASS="TOC" -><DL -><DT +CLASS="SECT1" +><H1 +CLASS="SECT1" +><A +NAME="AEN26">1.1. Read the man pages</H1 +><P +>The man pages distributed with SAMBA contain + lots of useful info that will help to get you started. + If you don't know how to read man pages then try + something like:</P +><P +><TT +CLASS="PROMPT" +>$ </TT +><TT +CLASS="USERINPUT" ><B ->Table of Contents</B -></DT -><DT ->2.1. <A -HREF="install.html#AEN187" ->Obtaining and installing samba</A -></DT -><DT ->2.2. <A -HREF="install.html#AEN193" ->Configuring samba</A -></DT -><DD -><DL -><DT ->2.2.1. <A -HREF="install.html#AEN198" ->Editing the <TT -CLASS="FILENAME" ->smb.conf</TT -> file</A -></DT -><DT ->2.2.2. <A -HREF="install.html#AEN223" ->SWAT</A -></DT -></DL -></DD -><DT ->2.3. <A -HREF="install.html#AEN229" ->Try listing the shares available on your - server</A -></DT -><DT ->2.4. <A -HREF="install.html#AEN238" ->Try connecting with the unix client</A -></DT -><DT ->2.5. <A -HREF="install.html#AEN259" ->Try connecting from a DOS, WfWg, Win9x, WinNT, - Win2k, OS/2, etc... client</A -></DT -><DT ->2.6. <A -HREF="install.html#AEN272" ->What If Things Don't Work?</A -></DT -><DD -><DL -><DT ->2.6.1. <A -HREF="install.html#AEN277" ->Scope IDs</A -></DT -><DT ->2.6.2. <A -HREF="install.html#AEN280" ->Locking</A -></DT -></DL -></DD -></DL +>man smbd.8</B +></TT +> + or + <TT +CLASS="PROMPT" +>$ </TT +><TT +CLASS="USERINPUT" +><B +>nroff -man smbd.8 | more + </B +></TT +> on older unixes.</P +><P +>Other sources of information are pointed to + by the Samba web site,<A +HREF="http://www.samba.org/" +TARGET="_top" +> http://www.samba.org</A +></P ></DIV ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A -NAME="AEN187" ->2.1. Obtaining and installing samba</A -></H1 +NAME="AEN36">1.2. Building the Binaries</H1 ><P ->Binary packages of samba are included in almost any Linux or - Unix distribution. There are also some packages available at - <A -HREF="http://samba.org/" -TARGET="_top" ->the samba homepage</A ->. - </P -><P ->If you need to compile samba from source, check the - <A -HREF="compiling.html" ->appropriate appendix chapter</A ->.</P +>To do this, first run the program <B +CLASS="COMMAND" +>./configure + </B +> in the source directory. This should automatically + configure Samba for your operating system. If you have unusual + needs then you may wish to run</P +><P +><TT +CLASS="PROMPT" +>root# </TT +><TT +CLASS="USERINPUT" +><B +>./configure --help + </B +></TT +></P +><P +>first to see what special options you can enable. + Then executing</P +><P +><TT +CLASS="PROMPT" +>root# </TT +><TT +CLASS="USERINPUT" +><B +>make</B +></TT +></P +><P +>will create the binaries. Once it's successfully + compiled you can use </P +><P +><TT +CLASS="PROMPT" +>root# </TT +><TT +CLASS="USERINPUT" +><B +>make install</B +></TT +></P +><P +>to install the binaries and manual pages. You can + separately install the binaries and/or man pages using</P +><P +><TT +CLASS="PROMPT" +>root# </TT +><TT +CLASS="USERINPUT" +><B +>make installbin + </B +></TT +></P +><P +>and</P +><P +><TT +CLASS="PROMPT" +>root# </TT +><TT +CLASS="USERINPUT" +><B +>make installman + </B +></TT +></P +><P +>Note that if you are upgrading for a previous version + of Samba you might like to know that the old versions of + the binaries will be renamed with a ".old" extension. You + can go back to the previous version with</P +><P +><TT +CLASS="PROMPT" +>root# </TT +><TT +CLASS="USERINPUT" +><B +>make revert + </B +></TT +></P +><P +>if you find this version a disaster!</P ></DIV ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A -NAME="AEN193" ->2.2. Configuring samba</A -></H1 +NAME="AEN64">1.3. The all important step</H1 ><P ->Samba's configuration is stored in the smb.conf file, - that usually resides in <TT -CLASS="FILENAME" ->/etc/samba/smb.conf</TT -> - or <TT -CLASS="FILENAME" ->/usr/local/samba/lib/smb.conf</TT ->. You can either - edit this file yourself or do it using one of the many graphical - tools that are available, such as the web-based interface swat, that - is included with samba.</P +>At this stage you must fetch yourself a + coffee or other drink you find stimulating. Getting the rest + of the install right can sometimes be tricky, so you will + probably need it.</P +><P +>If you have installed samba before then you can skip + this step.</P +></DIV ><DIV -CLASS="SECT2" -><H2 -CLASS="SECT2" +CLASS="SECT1" +><H1 +CLASS="SECT1" ><A -NAME="AEN198" ->2.2.1. Editing the <TT -CLASS="FILENAME" ->smb.conf</TT -> file</A -></H2 +NAME="AEN68">1.4. Create the smb configuration file.</H1 ><P >There are sample configuration files in the examples subdirectory in the distribution. I suggest you read them @@ -214,27 +243,31 @@ CLASS="FILENAME" ><P ><PRE CLASS="PROGRAMLISTING" ->[global] - workgroup = MYGROUP +> [global] + workgroup = MYGROUP -[homes] - guest ok = no - read only = no + [homes] + guest ok = no + read only = no </PRE ></P ><P >which would allow connections by anyone with an account on the server, using either their login name or - "<B -CLASS="COMMAND" ->homes</B ->" as the service name. (Note that I also set the + "homes" as the service name. (Note that I also set the workgroup that Samba is part of. See BROWSING.txt for details)</P ><P ->Make sure you put the <TT +>Note that <B +CLASS="COMMAND" +>make install</B +> will not install + a <TT CLASS="FILENAME" >smb.conf</TT -> file in the same place +> file. You need to create it + yourself. </P +><P +>Make sure you put the smb.conf file in the same place you specified in the<TT CLASS="FILENAME" >Makefile</TT @@ -245,35 +278,24 @@ CLASS="FILENAME" >).</P ><P >For more information about security settings for the - <B -CLASS="COMMAND" ->[homes]</B -> share please refer to the chapter - <A -HREF="securing-samba.html" ->Securing Samba</A ->.</P + [homes] share please refer to the document UNIX_SECURITY.txt.</P +></DIV ><DIV -CLASS="SECT3" -><H3 -CLASS="SECT3" +CLASS="SECT1" +><H1 +CLASS="SECT1" ><A -NAME="AEN214" ->2.2.1.1. Test your config file with +NAME="AEN82">1.5. Test your config file with <B CLASS="COMMAND" >testparm</B -></A -></H3 +></H1 ><P >It's important that you test the validity of your <TT CLASS="FILENAME" >smb.conf</TT -> file using the <SPAN -CLASS="APPLICATION" ->testparm</SPAN -> program. +> file using the testparm program. If testparm runs OK then it will list the loaded services. If not it will give an error message.</P ><P @@ -286,33 +308,199 @@ CLASS="FILENAME" >smb.conf</TT >!</P ></DIV +><DIV +CLASS="SECT1" +><H1 +CLASS="SECT1" +><A +NAME="AEN90">1.6. Starting the smbd and nmbd</H1 +><P +>You must choose to start smbd and nmbd either + as daemons or from <B +CLASS="COMMAND" +>inetd</B +>. Don't try + to do both! Either you can put them in <TT +CLASS="FILENAME" +> inetd.conf</TT +> and have them started on demand + by <B +CLASS="COMMAND" +>inetd</B +>, or you can start them as + daemons either from the command line or in <TT +CLASS="FILENAME" +> /etc/rc.local</TT +>. See the man pages for details + on the command line options. Take particular care to read + the bit about what user you need to be in order to start + Samba. In many cases you must be root.</P +><P +>The main advantage of starting <B +CLASS="COMMAND" +>smbd</B +> + and <B +CLASS="COMMAND" +>nmbd</B +> using the recommended daemon method + is that they will respond slightly more quickly to an initial connection + request.</P +><DIV +CLASS="SECT2" +><H2 +CLASS="SECT2" +><A +NAME="AEN100">1.6.1. Starting from inetd.conf</H2 +><P +>NOTE; The following will be different if + you use NIS or NIS+ to distributed services maps.</P +><P +>Look at your <TT +CLASS="FILENAME" +>/etc/services</TT +>. + What is defined at port 139/tcp. If nothing is defined + then add a line like this:</P +><P +><TT +CLASS="USERINPUT" +><B +>netbios-ssn 139/tcp</B +></TT +></P +><P +>similarly for 137/udp you should have an entry like:</P +><P +><TT +CLASS="USERINPUT" +><B +>netbios-ns 137/udp</B +></TT +></P +><P +>Next edit your <TT +CLASS="FILENAME" +>/etc/inetd.conf</TT +> + and add two lines something like this:</P +><P +><PRE +CLASS="PROGRAMLISTING" +> netbios-ssn stream tcp nowait root /usr/local/samba/bin/smbd smbd + netbios-ns dgram udp wait root /usr/local/samba/bin/nmbd nmbd + </PRE +></P +><P +>The exact syntax of <TT +CLASS="FILENAME" +>/etc/inetd.conf</TT +> + varies between unixes. Look at the other entries in inetd.conf + for a guide.</P +><P +>NOTE: Some unixes already have entries like netbios_ns + (note the underscore) in <TT +CLASS="FILENAME" +>/etc/services</TT +>. + You must either edit <TT +CLASS="FILENAME" +>/etc/services</TT +> or + <TT +CLASS="FILENAME" +>/etc/inetd.conf</TT +> to make them consistent.</P +><P +>NOTE: On many systems you may need to use the + "interfaces" option in smb.conf to specify the IP address + and netmask of your interfaces. Run <B +CLASS="COMMAND" +>ifconfig</B +> + as root if you don't know what the broadcast is for your + net. <B +CLASS="COMMAND" +>nmbd</B +> tries to determine it at run + time, but fails on some unixes. See the section on "testing nmbd" + for a method of finding if you need to do this.</P +><P +>!!!WARNING!!! Many unixes only accept around 5 + parameters on the command line in <TT +CLASS="FILENAME" +>inetd.conf</TT +>. + This means you shouldn't use spaces between the options and + arguments, or you should use a script, and start the script + from <B +CLASS="COMMAND" +>inetd</B +>.</P +><P +>Restart <B +CLASS="COMMAND" +>inetd</B +>, perhaps just send + it a HUP. If you have installed an earlier version of <B +CLASS="COMMAND" +> nmbd</B +> then you may need to kill nmbd as well.</P ></DIV ><DIV CLASS="SECT2" ><H2 CLASS="SECT2" ><A -NAME="AEN223" ->2.2.2. SWAT</A -></H2 -><P -> SWAT is a web-based interface that helps you configure samba. - SWAT might not be available in the samba package on your platform, - but in a seperate package. Please read the swat manpage - on compiling, installing and configuring swat from source. - </P -><P ->To launch SWAT just run your favorite web browser and - point it at "http://localhost:901/". Replace <VAR -CLASS="REPLACEABLE" ->localhost</VAR -> with the name of the computer you are running samba on if you - are running samba on a different computer then your browser.</P -><P ->Note that you can attach to SWAT from any IP connected - machine but connecting from a remote machine leaves your - connection open to password sniffing as passwords will be sent - in the clear over the wire. </P +NAME="AEN129">1.6.2. Alternative: starting it as a daemon</H2 +><P +>To start the server as a daemon you should create + a script something like this one, perhaps calling + it <TT +CLASS="FILENAME" +>startsmb</TT +>.</P +><P +><PRE +CLASS="PROGRAMLISTING" +> #!/bin/sh + /usr/local/samba/bin/smbd -D + /usr/local/samba/bin/nmbd -D + </PRE +></P +><P +>then make it executable with <B +CLASS="COMMAND" +>chmod + +x startsmb</B +></P +><P +>You can then run <B +CLASS="COMMAND" +>startsmb</B +> by + hand or execute it from <TT +CLASS="FILENAME" +>/etc/rc.local</TT +> + </P +><P +>To kill it send a kill signal to the processes + <B +CLASS="COMMAND" +>nmbd</B +> and <B +CLASS="COMMAND" +>smbd</B +>.</P +><P +>NOTE: If you use the SVR4 style init system then + you may like to look at the <TT +CLASS="FILENAME" +>examples/svr4-startup</TT +> + script to make Samba fit into that system.</P ></DIV ></DIV ><DIV @@ -320,21 +508,23 @@ CLASS="SECT1" ><H1 CLASS="SECT1" ><A -NAME="AEN229" ->2.3. Try listing the shares available on your - server</A -></H1 +NAME="AEN145">1.7. Try listing the shares available on your + server</H1 ><P -><SAMP +><TT CLASS="PROMPT" ->$ </SAMP -><KBD +>$ </TT +><TT CLASS="USERINPUT" +><B >smbclient -L - <VAR + <TT CLASS="REPLACEABLE" ->yourhostname</VAR -></KBD +><I +>yourhostname</I +></TT +></B +></TT ></P ><P >You should get back a list of shares available on @@ -357,69 +547,60 @@ CLASS="SECT1" ><H1 CLASS="SECT1" ><A -NAME="AEN238" ->2.4. Try connecting with the unix client</A -></H1 +NAME="AEN154">1.8. Try connecting with the unix client</H1 ><P -><SAMP +><TT CLASS="PROMPT" ->$ </SAMP -><KBD +>$ </TT +><TT CLASS="USERINPUT" ->smbclient <VAR +><B +>smbclient <TT CLASS="REPLACEABLE" -> //yourhostname/aservice</VAR -></KBD +><I +> //yourhostname/aservice</I +></TT +></B +></TT ></P ><P ->Typically the <VAR +>Typically the <TT CLASS="REPLACEABLE" ->yourhostname</VAR +><I +>yourhostname</I +></TT > - would be the name of the host where you installed <SPAN -CLASS="APPLICATION" ->smbd</SPAN ->. - The <VAR + would be the name of the host where you installed <B +CLASS="COMMAND" +> smbd</B +>. The <TT CLASS="REPLACEABLE" ->aservice</VAR +><I +>aservice</I +></TT > is any service you have defined in the <TT CLASS="FILENAME" >smb.conf</TT -> - file. Try your user name if you just have a <B -CLASS="COMMAND" ->[homes]</B -> - section +> + file. Try your user name if you just have a [homes] section in <TT CLASS="FILENAME" >smb.conf</TT >.</P ><P ->For example if your unix host is <VAR -CLASS="REPLACEABLE" ->bambi</VAR -> - and your login name is <VAR -CLASS="REPLACEABLE" ->fred</VAR -> you would type:</P +>For example if your unix host is bambi and your login + name is fred you would type:</P ><P -><SAMP +><TT CLASS="PROMPT" ->$ </SAMP -><KBD +>$ </TT +><TT CLASS="USERINPUT" ->smbclient //<VAR -CLASS="REPLACEABLE" ->bambi</VAR ->/<VAR -CLASS="REPLACEABLE" ->fred</VAR -> - </KBD +><B +>smbclient //bambi/fred + </B +></TT ></P ></DIV ><DIV @@ -427,77 +608,96 @@ CLASS="SECT1" ><H1 CLASS="SECT1" ><A -NAME="AEN259" ->2.5. Try connecting from a DOS, WfWg, Win9x, WinNT, - Win2k, OS/2, etc... client</A -></H1 +NAME="AEN170">1.9. Try connecting from a DOS, WfWg, Win9x, WinNT, + Win2k, OS/2, etc... client</H1 ><P >Try mounting disks. eg:</P ><P -><SAMP +><TT CLASS="PROMPT" ->C:\WINDOWS\> </SAMP -><KBD +>C:\WINDOWS\> </TT +><TT CLASS="USERINPUT" +><B >net use d: \\servername\service - </KBD + </B +></TT ></P ><P >Try printing. eg:</P ><P -><SAMP +><TT CLASS="PROMPT" ->C:\WINDOWS\> </SAMP -><KBD +>C:\WINDOWS\> </TT +><TT CLASS="USERINPUT" +><B >net use lpt1: - \\servername\spoolservice</KBD + \\servername\spoolservice</B +></TT ></P ><P -><SAMP +><TT CLASS="PROMPT" ->C:\WINDOWS\> </SAMP -><KBD +>C:\WINDOWS\> </TT +><TT CLASS="USERINPUT" +><B >print filename - </KBD + </B +></TT ></P +><P +>Celebrate, or send me a bug report!</P ></DIV ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A -NAME="AEN272" ->2.6. What If Things Don't Work?</A -></H1 +NAME="AEN184">1.10. What If Things Don't Work?</H1 +><P +>If nothing works and you start to think "who wrote + this pile of trash" then I suggest you do step 2 again (and + again) till you calm down.</P +><P +>Then you might read the file DIAGNOSIS.txt and the + FAQ. If you are still stuck then try the mailing list or + newsgroup (look in the README for details). Samba has been + successfully installed at thousands of sites worldwide, so maybe + someone else has hit your problem and has overcome it. You could + also use the WWW site to scan back issues of the samba-digest.</P +><P +>When you fix the problem PLEASE send me some updates to the + documentation (or source code) so that the next person will find it + easier. </P +><DIV +CLASS="SECT2" +><H2 +CLASS="SECT2" +><A +NAME="AEN189">1.10.1. Diagnosing Problems</H2 ><P ->Then you might read the file chapter - <A -HREF="diagnosis.html" +>If you have installation problems then go to the + <A +HREF="Diagnosis.html" +TARGET="_top" >Diagnosis</A -> and the - FAQ. If you are still stuck then try to follow - the <A -HREF="problems.html" ->Analysing and Solving Problems chapter</A -> - Samba has been successfully installed at thousands of sites worldwide, - so maybe someone else has hit your problem and has overcome it. </P +> chapter to try to find the + problem.</P +></DIV ><DIV CLASS="SECT2" ><H2 CLASS="SECT2" ><A -NAME="AEN277" ->2.6.1. Scope IDs</A -></H2 +NAME="AEN193">1.10.2. Scope IDs</H2 ><P >By default Samba uses a blank scope ID. This means all your windows boxes must also have a blank scope ID. If you really want to use a non-blank scope ID then you will need to use the 'netbios scope' smb.conf option. - All your PCs will need to have the same setting for + All your PCs will need to have the same setting for this to work. I do not recommend scope IDs.</P ></DIV ><DIV @@ -505,9 +705,65 @@ CLASS="SECT2" ><H2 CLASS="SECT2" ><A -NAME="AEN280" ->2.6.2. Locking</A -></H2 +NAME="AEN196">1.10.3. Choosing the Protocol Level</H2 +><P +>The SMB protocol has many dialects. Currently + Samba supports 5, called CORE, COREPLUS, LANMAN1, + LANMAN2 and NT1.</P +><P +>You can choose what maximum protocol to support + in the <TT +CLASS="FILENAME" +>smb.conf</TT +> file. The default is + NT1 and that is the best for the vast majority of sites.</P +><P +>In older versions of Samba you may have found it + necessary to use COREPLUS. The limitations that led to + this have mostly been fixed. It is now less likely that you + will want to use less than LANMAN1. The only remaining advantage + of COREPLUS is that for some obscure reason WfWg preserves + the case of passwords in this protocol, whereas under LANMAN1, + LANMAN2 or NT1 it uppercases all passwords before sending them, + forcing you to use the "password level=" option in some cases.</P +><P +>The main advantage of LANMAN2 and NT1 is support for + long filenames with some clients (eg: smbclient, Windows NT + or Win95). </P +><P +>See the smb.conf(5) manual page for more details.</P +><P +>Note: To support print queue reporting you may find + that you have to use TCP/IP as the default protocol under + WfWg. For some reason if you leave Netbeui as the default + it may break the print queue reporting on some systems. + It is presumably a WfWg bug.</P +></DIV +><DIV +CLASS="SECT2" +><H2 +CLASS="SECT2" +><A +NAME="AEN205">1.10.4. Printing from UNIX to a Client PC</H2 +><P +>To use a printer that is available via a smb-based + server from a unix host with LPR you will need to compile the + smbclient program. You then need to install the script + "smbprint". Read the instruction in smbprint for more details. + </P +><P +>There is also a SYSV style script that does much + the same thing called smbprint.sysv. It contains instructions.</P +><P +>See the CUPS manual for information about setting up + printing from a unix host with CUPS to a smb-based server. </P +></DIV +><DIV +CLASS="SECT2" +><H2 +CLASS="SECT2" +><A +NAME="AEN210">1.10.5. Locking</H2 ><P >One area which sometimes causes trouble is locking.</P ><P @@ -560,6 +816,17 @@ NAME="AEN280" or DENY_ALL. There are also special compatibility modes called DENY_FCB and DENY_DOS.</P ></DIV +><DIV +CLASS="SECT2" +><H2 +CLASS="SECT2" +><A +NAME="AEN219">1.10.6. Mapping Usernames</H2 +><P +>If you have different usernames on the PCs and + the unix server then take a look at the "username map" option. + See the smb.conf man page for details.</P +></DIV ></DIV ></DIV ><DIV @@ -578,7 +845,7 @@ WIDTH="33%" ALIGN="left" VALIGN="top" ><A -HREF="introsmb.html" +HREF="introduction.html" ACCESSKEY="P" >Prev</A ></TD @@ -596,7 +863,7 @@ WIDTH="33%" ALIGN="right" VALIGN="top" ><A -HREF="browsing-quick.html" +HREF="improved-browsing.html" ACCESSKEY="N" >Next</A ></TD @@ -606,7 +873,7 @@ ACCESSKEY="N" WIDTH="33%" ALIGN="left" VALIGN="top" ->Introduction to Samba</TD +>General installation</TD ><TD WIDTH="34%" ALIGN="center" @@ -620,7 +887,7 @@ ACCESSKEY="U" WIDTH="33%" ALIGN="right" VALIGN="top" ->Quick Cross Subnet Browsing / Cross Workgroup Browsing guide</TD +>Improved browsing in samba</TD ></TR ></TABLE ></DIV |