title: The user-mapping.xml file doesn't work in guacamole, Invalid login
body: <p>Recently, I was following installation instructions for Guacamole in the manual on <a href="http://guac-dev.org/" rel="noreferrer">http://guac-dev.org/</a>. My system is Ubuntu 14.04.</p>
  
  <p>First, I installed the basic required dependencies:</p>
  
  <pre><code>$ apt-get install -y apache2 libcairo2-dev libjpeg62-dev libpng12-dev libossp-uuid-dev libfreerdp-dev libpango1.0-dev libssh2-1-dev libtelnet-dev libpulse-dev libssl-dev libvorbis-dev maven tomcat7
  $ apt-get install -y libvncserver-dev
  </code></pre>
  
  <p>Then, I downloaded <code>guacamole-server-0.9.8.tar.gz</code> and <code>guacamole-0.9.8.war</code> and installed them according to the instructions in the manual:</p>
  
  <pre><code>$ tar xf guacamole-server-0.9.8.tar.gz
  $ cd guacamole-server-0.9.8
  $ ./configure
  $ make
  $ make install
  $ cp guacamole-0.9.8.war /var/lib/tomcat7/webapps/guacamole.war
  $ mkdir /etc/guacamole
  </code></pre>
  
  <p>I created the <code>/etc/guacamole/guacamole.properties</code>, containing the following:</p>
  
  <pre><code>guacd-hostname: localhost # although the guide says it should be guacd-host, but the example shown in http://guac-dev.org/doc/gug/configuring-guacamole.html is guacd-hostname
  guacd-port: 4822
  user-mapping: /etc/guacamole/user-mapping.xml
  </code></pre>
  
  <p><code>/etc/guacamole/user-mapping.xml</code> contains the following:</p>
  
  <pre><code>&lt;user-mapping&gt;
      &lt;authorize username="USERNAME" password="PASSWORD"&gt;
          &lt;protocol&gt;vnc&lt;/protocol&gt;
          &lt;param name="hostname"&gt;localhost&lt;/param&gt;
          &lt;param name="port"&gt;5901&lt;/param&gt;
          &lt;param name="password"&gt;123456&lt;/param&gt;
      &lt;/authorize&gt;
      &lt;authorize username="wangx" password="wangxiang"&gt;
          &lt;protocol&gt;vnc&lt;/protocol&gt;
          &lt;param name="hostname"&gt;192.168.1.111&lt;/param&gt;
          &lt;param name="port"&gt;5901&lt;/param&gt;
          &lt;param name="password"&gt;123456&lt;/param&gt;
      &lt;/authorize&gt;
  &lt;/user-mapping&gt;
  </code></pre>
  
  <p>I then restarted tomcat7 and guacd:</p>
  
  <pre><code>$ /etc/init.d/tomcat7 restart
  $ /etc/init.d/guacd restart
  </code></pre>
  
  <p>The <code>GUACAMOLE_HOME</code> environment variable is empty:</p>
  
  <pre><code>$ echo $GUACAMOLE_HOME
  </code></pre>
  
  <p>There is no <code>.guacamole</code> directory in <code>/home/&lt;user&gt;</code> nor in <code>/var/lib/tomcat7/webapps/guacamole</code>. When I visit the <code>http://localhost:8080/guacamole</code>, I entered username "wangx" and password "wangxiang", it shows invalid login.</p>
  
  <p>How can I solve this? Where should I locate the <code>guacamole.properties</code> and <code>user-mapping.xml</code> file? Did I do something wrong?</p>
  
  <p>Thank you for your attention.</p>