
#include "bacula_template.inc" title="Console Configuration" num=6.4

<H1>Console Configuration</H1>

<h2>General</h2>
The Console configuration file is the simplest of all the 
configuration files, and in general, you should not need to
change it except for the password. 
It simply contains the information necessary to
contact the Director or Directors.

<p>For a general discussion of configuration file and resources
including the data types recognized by <b>Bacula</b>, please
see the <a href="configure.html">Configuration</a> chapter of this
manual.
<p>
The following Console Resource definition must be defined:
<ul> 
  <li><a href="#DirectorResource">Director</a> -- to
      define the Director's name and his access password. Note,
      you may define more than one Director resource in the 
      Console configuration file. If you do so, the Console program
      will ask you which one you want to use.</li>
</ul>

<h2><a name="DirectorResource">The Director Resource</a></h2>
The Director resource defines the attributes of the Director running on
the network. 
You may have multiple Director resource specifications in a
single Console configuration file. If you have 
more than one, you will be prompted to choose one when you start
the <b>Console</b> program. 
<dl>
<dt>Director</dt><dd>Start of the Director records.
<dt>Name = &lt;name&gt;</dt><dd>The director name used to select
   among different Directors, otherwise, this name is not used.</dd>
    
<dt>DIRPort = &lt;port-number&gt;</dt><dd>Specify the port to use to connect
   to the Director. This value will most likely already be set to the value
   you specified on the <b>--with-base-port</b> option of the
   <b>./configure</b> command.  This port must be identical to the
   <b>DIRport</b> specified in the <b>Director</b> resource of the <a
   href="dirdconf.html">Director's configuration</a> file.
   The default is 9101 so this record is not normally specified.</dd>

<dt>Address = &lt;address&gt;</dt><dd>Where the address is a host name,
   a fully qualified domain name, or a network address used to connect
   to the Director.</dd>

<dt>Password = &lt;password&gt;</dt><dd>Where the password is the
   password needed for the Director to accept the Console connection.
   This password must be identical to the <b>Password</b> specified in
   the <b>Director</b> resource of the <a
   href="dirdconf.html">Director's configuration</a> file. This
   record is required.</dd>

</dl>
An actual example might be:
<pre>
Director {
  Name = HeadMan
  address = rufus.cats.com
  password = xyz1erploit
}
</pre>

<h2>The ConsoleFont Resource</a></h2>
The ConsoleFont resource is available only in the GNOME version
of the console. It permits you to define the font that you
want used to display in the main listing window.
<dl>
<dt>ConsoleFont</dt><dd>Start of the ConsoleFont records.
<dt>Name = &lt;name&gt;</dt><dd>The name of the font.</dd>
    
<dt>Font = &lt;X-Window Font Specification&gt;</dt><dd>
   The string value given here defines the desired font. It
   is specified in the standard cryptic X Window format.  For
   example, the default specification is:</dd>
    
<pre>
Font = "-misc-fixed-medium-r-normal-*-*-130-*-*-c-*-iso8859-1"
</pre>

</dl>
Thanks to Phil Stracchino for providing the code for this feature.
<p>
An actual example might be:
<pre>
ConsoleFont {
  Name = Default
Font = "-misc-fixed-medium-r-normal-*-*-130-*-*-c-*-iso8859-1"
}

</pre>

<h2><a name="ConsoleResource"></a>The Console Resource</h2>
As of Bacula version 1.33 and higher, there are three different
kinds of consoles, which the administrator or user can use to
interact with the Director. These three kinds of consoles comprise
three different security levels. 
<ul>
  <li>The first console type is an <b>anonymous</b> or <b>default</b>
      console, which has full privileges.  There is no console
      resource necessary for this type since the password is
      specified in the Director resource.  This is the kind of
      console that was initially implemented in versions prior to
      1.33 and remains valid.  Typically you would use it only
      for administrators.</li>
  <li>The second type of console, and new to version 1.33 and
      higher is a &quot;named&quot; console defined within a
      Console resource in both the Director's configuration file
      and in the Console's configuration file.  Both the names
      and the passwords in these two entries must match much as
      is the case for Client programs.  <p>This second type of
      console begins with absolutely no privileges except those
      explicitly specified in the Director's Console resource.
      Thus you can have multiple Consoles with different names
      and passwords, sort of like multiple users, each with
      different privileges.  As a default, these consoles can do
      absolutely nothing -- no commands what so ever.  You give
      them privileges or rather access to commands and resources
      by specifying access control lists in the Director's
      Console resource.  Note, if you are specifying such a
      console, you will want to put a null password in the
      Director resource.</li>
  <li>The third type of console is similar to the above mentioned
      one in that it requires a Console resource definition in
      both the Director and the Console.  In addition, if the
      console name, provided on the <b>Name =</b> directive, is
      the same as a Client name, the user of that console is
      permitted to use the <b>SetIP</b> command to change the
      Address directive in the Director's client resource to the
      IP address of the Console.  This permits portables or other
      machines using DHCP (non-fixed IP addresses) to
      &quot;notify&quot; the Director of their current IP
      address.  </li>
</ul>
<p>
The Console resource is optional and need not be specified.
However, if it is specified, you can use ACLs (Access Control
Lists) in the Director's configuration file to restrict the 
particular console (or user) to see only information pertaining
to his jobs or client machine.
<p>The following configuration files were supplied by Phil
Stracchino.  For example, if we define the following in the
user's bconsole.conf file (or perhaps the wx-console.conf
file):
<pre>
 Director {
   Name = MyDirector
   DIRport = 9101
   Address = myserver
   Password = "XXXXXXXXXXX"    # no, really.  this is not obfuscation.
                                 # dummy this sucker out.  you don't WANT
                                 # it to match, for this purpose.
 }
 
 Console {
   Name = restricted-user
   Password = "UntrustedUser"
 }
</pre>
Where the Password in the Director section is deliberately incorrect, and
the Console resource is given a name, in this case <b>restricted-client</b>.
Then in the Director's bacula-dir.conf file (not directly accessible by
the user), we define:
<pre>
Console {
  Name = restricted-user
  Password = "UntrustedUser"
  JobACL = "Restricted Client Save"
  ClientACL = restricted-client
  StorageACL = main-storage
  ScheduleACL = *all*
  PoolACL = *all*
  FileSetACL = "Restricted Client's FileSet"
  CatalogACL = DefaultCatalog
  CommandACL = run
}
</pre>
the user logging into the Director from his Console will get logged in
as <b>restricted-client</b>, and he will only be able to see or access
a Job with the name <b>Restricted Client Save</b> a Client with the
name <b>restricted-client</b>, a Storage device <b>main-storage</b>,
any Schedule or Pool, a FileSet named <b>Restricted Client's File</b>,
a Catalog named <b>DefaultCatalog</b>, and the only command he can
use in the Console is the <b>run</b> command. In other words, this
user is rather limited in what he can see and do with Bacula.


<h2>Console Commands</h2>
For more details on running the console and its commands, please
see the <a href="console.html">Bacula Console</a> chapter
of this manual.


<h2><a name="SampleConfiguration">Sample Console Configuration File</a></h2>
A example Console configuration file might be the following:
<pre>
\#
\# Bacula Console Configuration File
\#

Director {
  Name = HeadMan
  address = "my_machine.my_domain.com"
  Password = Console_password
}
</pre>

<page_prev name="Messages Resource" url="messagesres.html">
<page_next name="Monitor Configuration" url="monitorconf.html">
