








				   SMB HOWTO

		    : David Wood, dwood@plugged.net.au

		   : J.S. Lin, r6921068@ms.cc.ntu.edu.tw

			     v1.0, 10 August 1996



				   Abstract

      SMB HOWTO {ʹ SMB}.  ļ Linux ʹ Session
     Message Block (SMB) protocol{Э}, Ҳ NetBIOS  LanManager pro
     tocol.



1.  

 SMB HOWTO {ʹ SMB} .  ļ Linux ʹ Session Message
Block (SMB) protocol, Ҳ NetBIOS  LanManager protocol.

ļά David Wood (dwood@plugged.net.au).
,޸ĻԼĵ,Աһȥ.

SMB protocol ʹ Microsoft Windows 3.11, NT  95 ŵӡ.
ʹ Andrew Tridgell  Samba ׼, UNIX ( Linux)
ܷŵӡ Windows .

ʹ Samba :

  1.   linux ŵ Windows .

  2.   Windows ŵ linux .

  3.   linux ӡ Windows .

  4.   Windows ӡ linux .

ЩѰڱļ.

Disclaimer: procedures  script Ҫǿ,ҪЩ(proce
duresscript)ṩ߱.
Ѷͬ趨ܻ᲻.Ƶ, e-mail
,Ľļ, ߲κα֤.Ԥʲ?
߱ϾֻǸ.....


2.  һѶ

 HOWTO 跨ȥ趨 SMBԼӡ linux . Samba


SMB HOWTO								      1





SMB HOWTO								      2



Ǹǳİװ. طûҪ跨ȥе Samba ļ.

һѶ,뿴ļ:

    Samba ļ, ȡ Samba ׼{distribution}Ĳ.
     ˷׼ȡ: ftp://nimbus.anu.edu.au/pub/tridge/samba/1

    The linux Printing HOWTO.

    The Print2Win Mini-HOWTO.


3.  װ

 Samba ԭʼʽȡ:

ftp://nimbus.anu.edu.au/pub/tridge/samba/2

Ȼ,Ѱװ linux  Redhat 汾,ʹ׼{package}
װ.Щ汾Ҳ Samba binaries{Ԫʽ}.

 daemon{}  Samba ׼ ǱҪ. һǱװ
/usr/sbin ,ڿʱ,ϵͳ𶯵 scriptsinetdִ. scriptӱչʾ
ִ Daemons (section 4., page 3).

	  smbd (The SMB daemon)
	  nmbd (ṩ NetBIOS nameserver ֧Ԯ clients)

һ,µ Samba  binaries װ /usr/bin, Ȼ˵λǿѡ.

	  smbclient (һֹ UNIX õ SMB  client{ʽ})
	  smbprint  (һ script ӡ SMB {host}ϵб)
	  smbprint.sysv  (ͬ, ṩ SVR4 UNIX õ)
	  smbstatus (гԵ֮Ŀǰ SMB )
	  smbrun	 (һ 'glue' script ׵ִӦóʽ SMB )

,һֽ 'print'  script ڱ HOWTO ֮, һõ front
end{ǰ˽}  smbprint script.

Samba ׼Ǽװװ.򵥵شλַȡԭʼ, Ķڷ׼е
README . ڷ׼Ҳһ docs/INSTALL.txt
ṩһ򵥵𲽰װָʾ.

װ,  daemons ŵ /usr/sbin  binaries ŵ /usr/bin.  man
pages{ֲҳ}  /usr/local/man.

 Samba ׼,  Makefile лм̬,smb.conf,λ.
һ /etc, ԰ڵϲڵλ. Щʹ÷{direc
tions}, ǽصλó /etc/smb.conf, log λΪ log file =

____________________

1. <URL:ftp://nimbus.anu.edu.au/pub/tridge/samba/>

2. <URL:ftp://nimbus.anu.edu.au/pub/tridge/samba/>







SMB HOWTO								      3



/var/log/samba-log.%m , lock Ŀ¼Ϊ lock directory = /var/lock/samba.

װ̬{configuration}, smb.conf. ȥ Samba ڵĵĿ¼. һĿ¼
example/simple Ҷһ README . ǸĿ¼µ smb.conf  /etc .
ע! һ linux ׼Ѱװ Samba, Ҳ Samba ̬ /etc
. ӦôǸʼ.

㲻̬ /etc Ŀ¼,԰Ҫڵĵط,Ȼ /etc
һ symlink{}:

	  ln -s /path/to/smb.conf /etc/smb.conf


4.  ִ daemon

 daemon  /usr/sbin/smbd  /usr/sbin/nmbd.

ִ Samba daemon  inetd 򵱳ɵĳ.
趨һõŷ,Ӧô inetd
ִ,,ǽ¿ʼ.ֻżҪʹ SMB
ŷ,ϵͳ,Ҫʱ,Խʹ /etc/rc.d/init.d
script,ֱֶ.

Ҫ inetd ִ daemon , ¼ inetd ̬, /etc/inetd.conf:


	      # SAMBA NetBIOS services (for PC file and print sharing)
	      netbios-ssn stream tcp nowait root /usr/sbin/smbd smbd
	      netbios-ns dgram udp wait root /usr/sbin/nmbd nmbd


ȻָԱ inetd daemon :

	 kill -HUP 1

Ҫϵͳ script ִ daemon, µ script һ
/etc/rc.d/init.d/smb ,  symbolically link ע{comments}˵ĵ:

























SMB HOWTO								      4



	      #!/bin/sh

	      #
	      # /etc/rc.d/init.d/smb - starts and stops SMB services.
	      #
	      # The following files should be synbolic links to this file:
	      # symlinks: /etc/rc.d/rc1.d/K35smb  (Kills SMB services on shutdown)
	      # 	  /etc/rc.d/rc3.d/S91smb  (Starts SMB services in multiuser mode)
	      # 	  /etc/rc.d/rc6.d/K35smb  (Kills SMB services on reboot)
	      #

	      # Source function library.
	      . /etc/rc.d/init.d/functions

	      # Source networking configuration.
	      . /etc/sysconfig/network

	      # Check that networking is up.
	      [ ${NETWORKING} = "no" ] && exit 0

	      # See how we were called.
	      case "$1" in
		start)
	       echo -n "Starting SMB services: "
	       daemon smbd -D
	       daemon nmbd -D
	       echo
	       touch /var/lock/subsys/smb
	       ;;
		stop)
	       echo -n "Shutting down SMB services: "
	       killproc smbd
	       killproc nmbd
	       rm -f /var/lock/subsys/smb
	       echo ""
	       ;;
		*)
	       echo "Usage: smb {start|stop}"
	       exit 1
	      esac



5.  һ̬趨 (/etc/smb.conf)

 linux ( UNIX)ϵ Samba ̬趨Ǳһ, /etc/smb.conf
,. ҪĸϵͳԴԼʲ.

Ϊ½ڽᴦ linux ŵӡ Windows , Сչʾ
smb.conf ȡýϼ򵥵, ֻԽΪĿ.

ĿǰҪϸڲ. ½ڽҪĸ.

ڵеÿĶ{section}иͷʼ, ͷ [global], [homes],








SMB HOWTO								      5



[printers] ȵ.

[global] 䶨һЩ,  Samba Դ֮.

[homes] Զʹȡڵ(linux)֮ǵ(ֻǵ) home
directories{Ŀ¼}. Ҳ, һ Windows ʹߴǵ Windows
Ҫ跨ӵ, ǽӵԼ˵ home directiory.
Ҫ,Ҫע,Ǳlinux boxиʺ.

µ smb.conf Զʹõػǵ home directories
дһݴĿ¼. һ Windows ʹ,Ҫ뿴Щ, linux box
·{local network}. Ȼ,ʹ߼򵥵ش Windows File Manager 
Windows Explorer ӵ·ŵ.

¶Ҫע, ֮ĿԴ.


	  ; /etc/smb.conf
	  ;
	  ; Make sure and restart the server after making changes to this file, ex:
	  ; /etc/rc.d/init.d/smb stop
	  ; /etc/rc.d/init.d/smb start

	  [global]
	  ; Uncomment this if you want a guest account
	  ; guest account = nobody
	     log file = /var/log/samba-log.%m
	     lock directory = /var/lock/samba
	     share modes = yes

	  [homes]
	     comment = Home Directories
	     browseable = no
	     read only = no
	     create mode = 0750

	  [tmp]
	     comment = Temporary file space
	     path = /tmp
	     read only = no
	     public = yes



6.   Linux ŵ Windows 

չʾ smb.conf ,  linux ŵ Windows ʹǺ׵. Ȼ,
 Samba Ķ, ԿƵܴĳ̶. Щ :

Ϊ˷Ŀ¼ʹ, ͽ [tmp] , ༴Ķ
smb.conf:











SMB HOWTO								      6



	  [public]
	     comment = Public Stuff
	     path = /home/public
	     public = yes
	     writable = yes
	     printable = yes

ΪʹĿ¼ڿɶȡ,ֻȺԱ{group
staff}д,޸Ŀ:


	  [public]
	     comment = Public Stuff
	     path = /home/public
	     public = yes
	     writable = yes
	     printable = no
	     write list = @staff


ŵļ,뿴 Samba ļ man pages.


7.   Windows ŵ Linux 

һָ UNIX õ SMB client ʽ Samba
׼֮.ṩһµftpĽ.

ҪڸЩȡ, ִ:

	 /usr/sbin/smbclient -L host

 'host' ҪĻ. ⽫Ӧһ 'service'  - Ҳ,
Ĵŵӡ.  SMB ŷûаȫϵ趨,
Ҫ.  'guest'
ʺŵ̨ʺŵ.

ٸ:

	 smbclient -L zimmerman

ָӦÿ:




















SMB HOWTO								      7



	  Server time is Sat Aug 10 15:58:27 1996
	  Timezone is UTC+10.0
	  Password:
	  Domain=[WORKGROUP] OS=[Windows NT 3.51] Server=[NT LAN Manager 3.51]

	  Server=[ZIMMERMAN] User=[] Workgroup=[WORKGROUP] Domain=[]

		  Sharename	 Type	   Comment
		  ---------	 ----	   -------
		  ADMIN$	 Disk	   Remote Admin
		  public	 Disk	   Public
		  C$		 Disk	   Default share
		  IPC$		 IPC	   Remote IPC
		  OReilly	 Printer   OReilly
		  print$	 Disk	   Printer Drivers


	  This machine has a browse list:

		  Server	       Comment
		  ---------	       -------
		  HOPPER	       Samba 1.9.15p8
		  KERNIGAN	       Samba 1.9.15p8
		  LOVELACE	       Samba 1.9.15p8
		  RITCHIE	       Samba 1.9.15p8
		  ZIMMERMAN


 browse list гԴ· SMB ŷ.

Ҫʹô client, ִ:

	 /usr/sbin/smbclient service <password>

 'service' һ̨ͷ. ,跨һ̨ zimmer
man Ļ֮ 'public' ΪƵĿ¼ , service Ҫ  \\zimmerman\pub
lic. Ȼ,Ϊ shell , Ҫ backslashes, ҪĽ:

	 /usr/sbin/smbclient \\\\zimmerman\\public mypasswd

 'mypasswd' ִ֮{literal string}.

㽫 smbclient ʾ{prompt}:


	  Server time is Sat Aug 10 15:58:44 1996
	  Timezone is UTC+10.0
	  Domain=[WORKGROUP] OS=[Windows NT 3.51] Server=[NT LAN Manager 3.51]
	  smb: \>


 'h' ȡùʹ smbclient  help:










SMB HOWTO								      8



	  smb: \> h
	  ls		 dir		lcd	       cd	      pwd
	  get		 mget		put	       mput	      rename
	  more		 mask		del	       rm	      mkdir
	  md		 rmdir		rd	       prompt	      recurse
	  translate	 lowercase	print	       printmode      queue
	  cancel	 stat		quit	       q	      exit
	  newer 	 archive	tar	       blocksize      tarmode
	  setmode	 help		?	       !
	  smb: \>


ʹftp,ӦòҪѯ smbclient  man pages.


8.   Linux ӡ Windows 

Ϊ˷ Linux ӡ Windows , ȷӡѾװ.
ܴ linux ӡ,趨 SMB ӡֱ.

 Printing HOWTO 趨صӡ.

Ϊʹñӵ Windows NT ӡ,
СڲӦñΪ,ֻǽ.κϸϿɷ,
뽫Щϼĵ dwood@plugged.net.au ʹСܹ.

ӡ趨 smb.conf:



































SMB HOWTO								      9



	  [global]
	     printing = bsd
	     printcap name = /etc/printcap
	     load printers = yes
	     log file = /var/log/samba-log.%m
	     lock directory = /var/lock/samba

	  [printers]
	     comment = All Printers
	     security = server
	     path = /var/spool/lpd/lp
	     browseable = no
	     printable = yes
	     public = yes
	     writable = no
	     create mode = 0700

	  [ljet]
	     security = server
	     path = /var/spool/lpd/lp
	     printer name = lp
	     writable = yes
	     public = yes
	     printable = yes
	     print command = lpr -r -h -P %p %s


ȷӡ·([ljet])Ҫ /etc/printcapе spool Ŀ¼!

ע:  ʹ Samba  UNIX boxes ϵӡ Windows NT һЩ.
һʹ NT ʵؿӡ. Ҫ, 뿴 Samba
׼ϵ˵,  docs/WinNT.txt .Ǵ.
˽벻ܳɹ,뿴ͬļϵ˵.


9.   Windows ӡ Linux 

Ϊ˷ Windows ϵӡ, ²:

a)  /etc/printcap ʵļ¼,Ǳ뵱Ŀ¼ṹ ( spool
Ŀ¼) .

b)  script  /usr/bin/smbprint. 渽 Samba source,
渽 Samba binary ׼. һ΢޸İ汾.

c) Ҫת ASCII  Postscript,netscript,Ч.
netscipt һ Postscript תһǰװ /usr/bin.

d) ϣʹõ frond end ʹ Samba ӡ. һ춴
ASCII, Postscript  Postscript ļ perl script .

 /etc/printcap Ŀ Windows NT  HP 5MP ӡ. ЩĿ:










SMB HOWTO								     10



	  cm - comment
		  {˵}
	  lp - device name to open for output
		  {Ϊ,Ҫ豸}
	  sd - the printer's spool directory (on the local machine)
		  {ӡ spool Ŀ¼ (ڵصĻ)}
	  af - the accounting file
		  {ʺŵ}
	  mx - the maximum file size (zero is unlimited)
		  {󵵰С (ʾû)}
	  if - name of the input filter (script)
		  {֮ (script)}

ҪȡøѶ,뿴 Printing HOWTO ߹ printcap  man page.


	  # /etc/printcap
	  #
	  # //zimmerman/oreilly via smbprint
	  #
	  lp:\
		  :cm=HP 5MP Postscript OReilly on zimmerman:\
		  :lp=/dev/lp1:\
		  :sd=/var/spool/lpd/lp:\
		  :af=/var/spool/lpd/lp/acct:\
		  :mx#0:\
		  :if=/usr/bin/smbprint:


ȷ spool  accounting{ʺ} Ŀ¼ҿд. ȷĳʵ·ָ
smbprint script () ȷʵ豸ָ ( /dev ĳ).

¸ smbprint script . ͨ /usr/bin Ϊ Andrew Tridgell
Ե,֪ Samba. 渽 Samba source ׼, ĳЩ
binary ׼û, һ.

ϣϸؿ. ĳЩС޸Ѿ֤Ǻõ.

























SMB HOWTO								     11



	  #!/bin/sh -x

	  # This script is an input filter for printcap printing on a unix machine. It
	  # uses the smbclient program to print the file to the specified smb-based
	  # server and service.
	  # For example you could have a printcap entry like this
	  #
	  # smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint
	  #
	  # which would create a unix printer called "smb" that will print via this
	  # script. You will need to create the spool directory /usr/spool/smb with
	  # appropriate permissions and ownerships for your system.

	  # Set these to the server and service you wish to print to
	  # In this example I have a WfWg PC called "lapland" that has a printer
	  # exported called "printer" with no password.

	  #
	  # Script further altered by hamiltom@ecnz.co.nz (Michael Hamilton)
	  # so that the server, service, and password can be read from
	  # a /usr/var/spool/lpd/PRINTNAME/.config file.
	  #
	  # In order for this to work the /etc/printcap entry must include an
	  # accounting file (af=...):
	  #
	  #   cdcolour:\
	  #    :cm=CD IBM Colorjet on 6th:\
	  #    :sd=/var/spool/lpd/cdcolour:\
	  #    :af=/var/spool/lpd/cdcolour/acct:\
	  #    :if=/usr/local/etc/smbprint:\
	  #    :mx=0:\
	  #    :lp=/dev/null:
	  #
	  # The /usr/var/spool/lpd/PRINTNAME/.config file should contain:
	  #   server=PC_SERVER
	  #   service=PR_SHARENAME
	  #   password="password"
	  #
	  # E.g.
	  #   server=PAULS_PC
	  #   service=CJET_371
	  #   password=""

	  #
	  # Debugging log file, change to /dev/null if you like.
	  #
	  logfile=/tmp/smb-print.log
	  # logfile=/dev/null


	  #
	  # The last parameter to the filter is the accounting file name.
	  #
	  spool_dir=/var/spool/lpd/lp








SMB HOWTO								     12



	  config_file=$spool_dir/.config

	  # Should read the following variables set in the config file:
	  #   server
	  #   service
	  #   password
	  #   user
	  eval `cat $config_file`

	  #
	  # Some debugging help, change the >> to > if you want to same space.
	  #
	  echo "server $server, service $service" >> $logfile

	  (
	  # NOTE You may wish to add the line `echo translate' if you want automatic
	  # CR/LF translation when printing.
		  echo translate
	       echo "print -"
	       cat
	  ) | /usr/bin/smbclient "\\\\$server\\$service" $password -U $user -N -P >> $logfile


󲿷 linux ׼渽 nenscript ת ASCII ļ Postscript. 
perl script  smbprint ʹṩһּ򵥽 linux ӡ.

     Usage: print [-a|c|p] <filename>
	    -a prints <filename> as ASCII
	    -c prints <filename> formatted as source code
	    -p prints <filename> as Postscript
	     If no switch is given, print attempts to
	     guess the file type and print appropriately.

ʹ smbprint ӡ ASCII 춽ضϹ. ܵĻ, script
ضϳ춿հ׼(ȡֵм).

ʽԭʼǱ nenscript .  ASCII øѡıͷ(
date,filename)ʽ. Ҳɼ. ʹ⵱,
ʽ̬Դɵ.

Postscript ļѾʵظʽ,ֱͨ.





















SMB HOWTO								     13



	  #!/usr/bin/perl

	  # Script:   print
	  # Authors:  Brad Marshall, David Wood
	  #	   Plugged In Communications
	  # Date:     960808
	  #
	  # Script to print to oreilly which is currently on zimmerman
	  # Purpose:  Takes files of various types as arguments and
	  # processes them appropriately for piping to a Samba print script.
	  #
	  # Currently supported file types:
	  #
	  # ASCII      - ensures that lines longer than $line_length characters wrap on
	  #		 whitespace.
	  # Postscript - Takes no action.
	  # Code       - Formats in Postscript (using nenscript) to display
	  #		 properly (landscape, font, etc).
	  #

	  # Set the maximum allowable length for each line of ASCII text.
	  $line_length = 76;

	  # Set the path and name of the Samba print script
	  $print_prog = "/usr/bin/smbprint";

	  # Set the path and name to nenscript (the ASCII-->Postscript converter)
	  $nenscript = "/usr/bin/nenscript";

	  unless ( -f $print_prog ) {
	       die "Can't find $print_prog!";
	  }
	  unless ( -f $nenscript ) {
	       die "Can't find $nenscript!";
	  }

	  &ParseCmdLine(@ARGV);

	  # DBG
	  print "filetype is $filetype\n";

	  if ($filetype eq "ASCII") {
	       &wrap($line_length);
	  } elsif ($filetype eq "code") {
	       &codeformat;
	  } elsif ($filetype eq "ps") {
	       &createarray;
	  } else {
	       print "Sorry..no known file type.\n";
	       exit 0;
	  }
	  # Pipe the array to smbprint
	  open(PRINTER, "|$print_prog") || die "Can't open $print_prog: $!\n";
	  foreach $line (@newlines) {








SMB HOWTO								     14



	       print PRINTER $line;
	  }
	  # Send an extra linefeed in case a file has an incomplete last line.
	  print PRINTER "\n";
	  close(PRINTER);
	  print "Completed\n";
	  exit 0;

	  # --------------------------------------------------- #
	  #	   Everything below here is a subroutine	#
	  # --------------------------------------------------- #

	  sub ParseCmdLine {
	       # Parses the command line, finding out what file type the file is

	       # Gets $arg and $file to be the arguments (if the exists)
	       # and the filename
	       if ($#_ < 0) {
		    &usage;
	       }
	       # DBG
	  #    foreach $element (@_) {
	  #	    print "*$element* \n";
	  #    }

	       $arg = shift(@_);
	       if ($arg =~ /\-./) {
		    $cmd = $arg;
	       # DBG
	  #    print "\$cmd found.\n";

		    $file = shift(@_);
	       } else {
		    $file = $arg;
	       }

	       # Defining the file type
	       unless ($cmd) {
		    # We have no arguments

		    if ($file =~ /\.ps$/) {
			 $filetype = "ps";
		    } elsif ($file =~ /\.java$|\.c$|\.h$|\.pl$|\.sh$|\.csh$|\.m4$|\.inc$|\.html$|\.htm$/) {
			 $filetype = "code";
		    } else {
			 $filetype = "ASCII";
		    }

		    # Process $file for what type is it and return $filetype
	       } else {
		    # We have what type it is in $arg
		    if ($cmd =~ /^-p$/) {
			 $filetype = "ps";
		    } elsif ($cmd =~ /^-c$/) {








SMB HOWTO								     15



			 $filetype = "code";
		    } elsif ($cmd =~ /^-a$/) {
			 $filetype = "ASCII"
		    }
	       }
	  }

	  sub usage {
	       print "
	  Usage: print [-a|c|p] <filename>
		 -a prints <filename> as ASCII
		 -c prints <filename> formatted as source code
		 -p prints <filename> as Postscript
		  If no switch is given, print attempts to
		  guess the file type and print appropriately.\n
	  ";
	       exit(0);
	  }

	  sub wrap {
	       # Create an array of file lines, where each line is < the
	       # number of characters specified, and wrapped only on whitespace

	       # Get the number of characters to limit the line to.
	       $limit = pop(@_);

	       # DBG
	       #print "Entering subroutine wrap\n";
	       #print "The line length limit is $limit\n";

	       # Read in the file, parse and put into an array.
	       open(FILE, "<$file") || die "Can't open $file: $!\n";
	       while(<FILE>) {
		    $line = $_;

		    # DBG
		    #print "The line is:\n$line\n";

		    # Wrap the line if it is over the limit.
		    while ( length($line) > $limit ) {

			 # DBG
			 #print "Wrapping...";

			 # Get the first $limit +1 characters.
			 $part = substr($line,0,$limit +1);

			 # DBG
			 #print "The partial line is:\n$part\n";

			 # Check to see if the last character is a space.
			 $last_char = substr($part,-1, 1);
			 if ( " " eq $last_char ) {
			     # If it is, print the rest.








SMB HOWTO								     16



			     # DBG
			     #print "The last character was a space\n";

			     substr($line,0,$limit + 1) = "";
			     substr($part,-1,1) = "";
			     push(@newlines,"$part\n");
			 } else {
			      # If it is not, find the last space in the
			      # sub-line and print up to there.

			     # DBG
			     #print "The last character was not a space\n";

			      # Remove the character past $limit
			      substr($part,-1,1) = "";
			      # Reverse the line to make it easy to find
			      # the last space.
			      $revpart = reverse($part);
			      $index = index($revpart," ");
			      if ( $index > 0 ) {
				substr($line,0,$limit-$index) = "";
				push(@newlines,substr($part,0,$limit-$index)
				    . "\n");
			      } else {
				# There was no space in the line, so
				# print it up to $limit.
				substr($line,0,$limit) = "";
				push(@newlines,substr($part,0,$limit)
				    . "\n");
			      }
			 }
		    }
		    push(@newlines,$line);
	       }
	       close(FILE);
	  }

	  sub codeformat {
	       # Call subroutine wrap then filter through nenscript
	       &wrap($line_length);

	       # Pipe the results through nenscript to create a Postscript
	       # file that adheres to some decent format for printing
	       # source code (landscape, Courier font, line numbers).
	       # Print this to a temporary file first.
	       $tmpfile = "/tmp/nenscript$$";
	       open(FILE, "|$nenscript -2G -i$file -N -p$tmpfile -r") ||
		    die "Can't open nenscript: $!\n";
	       foreach $line (@newlines) {
		    print FILE $line;
	       }
	       close(FILE);

	       # Read the temporary file back into an array so it can be








SMB HOWTO								     17



	       # passed to the Samba print script.
	       @newlines = ("");
	       open(FILE, "<$tmpfile") || die "Can't open $file: $!\n";
	       while(<FILE>) {
		    push(@newlines,$_);
	       }
	       close(FILE);
	       system("rm $tmpfile");
	  }

	  sub createarray {
	       # Create the array for postscript
	       open(FILE, "<$file") || die "Can't open $file: $!\n";
	       while(<FILE>) {
		    push(@newlines,$_);
	       }
	       close(FILE);
	  }



10.  Ȩ

1996  HOWTO Ȩ David Wood.
κʽظԼɵɢ,ֻҪԭⲻ,.


11.  м

ֻҪдŸṩ, ҽ(ļ)һм.
































SMB HOWTO								     18





































































				   CONTENTS



1.   .................................................................... 1

2.  һѶ .............................................................. 1

3.  װ .................................................................... 2

4.  ִ daemon ....................................................... 3

5.  һ̬趨 (/etc/smb.conf) ............................................ 4

6.   Linux ŵ Windows  .......................................... 5

7.   Windows ŵ Linux  .......................................... 6

8.   Linux ӡ Windows  ........................................ 8

9.   Windows ӡ Linux  ........................................ 9

10. Ȩ ................................................................... 17

11. м ................................................................... 17































				       i


