User-mapping.xml does not work in guacamole, invalid login

Recently, I have been guided by the Guacamole installation instructions in the http://guac-dev.org/ guide . My system is Ubuntu 14.04.

First, I installed the basic required dependencies:

$ 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

Then I downloaded guacamole-server-0.9.8.tar.gzand guacamole-0.9.8.warinstalled them according to the instructions in the manual:

$ 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

I created /etc/guacamole/guacamole.propertiescontaining the following:

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

/etc/guacamole/user-mapping.xml contains the following:

<user-mapping>
    <authorize username="USERNAME" password="PASSWORD">
        <protocol>vnc</protocol>
        <param name="hostname">localhost</param>
        <param name="port">5901</param>
        <param name="password">123456</param>
    </authorize>
    <authorize username="wangx" password="wangxiang">
        <protocol>vnc</protocol>
        <param name="hostname">192.168.1.111</param>
        <param name="port">5901</param>
        <param name="password">123456</param>
    </authorize>
</user-mapping>

Then I restarted tomcat7 and guacd:

$ /etc/init.d/tomcat7 restart
$ /etc/init.d/guacd restart

The environment variable is GUACAMOLE_HOMEempty:

$ echo $GUACAMOLE_HOME

In /home/<user>and /var/lib/tomcat7/webapps/guacamolethere is no catalog .guacamole. When I visit http://localhost:8080/guacamole, I entered the wangx username and wangxiang password, it shows an invalid login.

? guacamole.properties user-mapping.xml? - ?

.

+4
1

:

...
$ mkdir /etc/guacamole

/etc/guacamole. GUACAMOLE_HOME, - Guacamole, , . GUACAMOLE_HOME Guacamole:

GUACAMOLE_HOME

Guacamole , , . , Guacamole , :

  • , guacamole.home.
  • , GUACAMOLE_HOME.
  • .guacamole, , .

GUACAMOLE_HOME .

Guacamole GUACAMOLE_HOME , guacamole.properties....

guacamole.properties user-mapping.xml , Guacamole , GUACAMOLE_HOME. .guacamole Tomcat /etc/guacamole. "tomcat7" Ubuntu Tomcat - /usr/share/tomcat7:

$ ln -s /etc/guacamole/ /usr/share/tomcat7/.guacamole

.guacamole guacamole.properties. user-mapping.xml guacamole.properties, GUACAMOLE_HOME:

$ mkdir /usr/share/tomcat7/.guacamole
$ ln -s /etc/guacamole/guacamole.properties /usr/share/tomcat7/.guacamole/

Tomcat , .

+7

Source: https://habr.com/ru/post/1614262/


All Articles