Page 271 - DCAP602_NETWORK_OPERATING_SYSTEMS_I
P. 271

Unit 14: File Server




          To restart the server, type the following command in a shell prompt while logged in as root:  notes

          /sbin/service smb restart
          The condrestart (conditional restart) option only starts smb on the condition that it is currently
          running.  This  option  is  useful  for  scripts,  because  it  does  not  start  the  daemon  if  it  is  not
          running.

          When the smb.conf file is changed, Samba automatically reloads it after a few minutes. Issuing
          a manual restart.
          To conditionally restart the server, type the following command as root:

          /sbin/service smb condrestart
          A manual reload of the smb.conf file can be useful in case of a failed automatic reload by the smb
          service. To ensure that the Samba server configuration file is reloaded without restarting the
          service, type the following command as root:
          /sbin/service smb reload
          By  default,  the  smb  service  does  not  start  automatically  at  boot  time.  To  configure  Samba  to
          start at boot time, use an initscript utility, such as /sbin/chkconfig, /usr/sbin/ntsysv, or the Services
          Configuration




              Task    Write the two commands to start the Samba server.

          You can start or stop the Samba server automatically (during boot) or manually. Starting and
          stopping policy is a part of the YaST Samba server configuration To stop or start running Samba
          services with YaST, use System+System Services (Runlevel) and check winbind, smb, and nmb.
          From a command line, stop services required for Samba with rcsmb stop && rcnmb stop and
          start them with rcnmb start && rcsmb start; rcsmb cares about winbind if needed.

          14.4 Configuring Samba with SWAT

          Samba’s configuration is stored in the smb.conf file, which generally resides in /etc/samba/
          smb.conf or /usr/local/samba/lib/smb.conf. 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.

          Configuration File Syntax

          The smb.conf file uses the similar syntax as the various old .ini files in Windows 3.1: Each file
          consists of various sections, which are started by putting the section name between brackets ([])
          on a new line. Each contains zero or more key/value pairs separated by an equality sign (=). The
          file is just a plaintext file, so you can open and edit it with your favorite editing tool.

          Each section in the smb.conf file symbolizes either a share or a meta-service on the Samba server.
          The section [global] is special, since it contains settings that apply to the whole Samba server.
          Samba supports a number of meta-services, each of which serves its own purpose. For example,
          the [homes] share is a meta-service that causes Samba to provide a personal home share for each
          user. The [printers] share is a meta-service that establishes print queue support and that specifies
          the location of the intermediate spool directory into which print jobs are received from Windows
          clients prior to being dispatched to the UNIX/Linux print spooler.






                                           LoveLy professionaL university                                   265
   266   267   268   269   270   271   272   273   274   275   276