title: Multiple realms
body: <p>I am setting up a client and connecting to multiple Kerberos enabled systems using a java client.</p>
  
  <p>Using <code>UserGroupInformation</code>. Java client always picks the <code>default_realm</code> and throws error if am using other realms.</p>
  
  <p>Is it possible to connect using different keytabs and different principals but use the same <code>krb5.conf</code>?</p>
  
  <p><code>/etc/krb5.conf</code>:</p>
  
  <pre><code>[libdefaults]
  default_realm = NEW.COM
  dns_lookup_realm = false
  dns_lookup_kdc = false
  ticket_lifetime = 1d
  renew_lifetime = 7d
  forwardable = true
  
  [realms]
  NEW.COM = {
    kdc = bharath.kdc
    admin_server = bharath.kdc
  }
  
  EXAMPLE.COM = {
    kdc = wckdserver.krbnet
    admin_server = wckdserver.krbnet
  }
  </code></pre>