The user-mapping.xml file doesn't work in guacamole, Invalid login

社会主义新天地 提交于 2019-12-05 17:40:16

according to the instructions in the manual:

...
$ mkdir /etc/guacamole

Guacamole will not automatically read from /etc/guacamole. It will read from GUACAMOLE_HOME, but this is not an environment variable - it is a placeholder for the Guacamole configuration directory which can be determined through an environment variable of the same name, but there are other possible locations. From the GUACAMOLE_HOME description in the Guacamole manual:

GUACAMOLE_HOME

Guacamole reads files from its own configuration directory by default, resorting to the classpath only when this directory cannot be found. When locating this directory, Guacamole will try, in order:

  1. The directory specified within the system property guacamole.home.
  2. The directory specified within the environment variable GUACAMOLE_HOME.
  3. The directory .guacamole, located within the home directory of the user running the servlet container.

This directory will be referred to as GUACAMOLE_HOME elsewhere in the documentation.

Guacamole uses GUACAMOLE_HOME as the primary search location for configuration file like guacamole.properties. ...

Your guacamole.properties and user-mapping.xml look fine, but Guacamole will not be able to find those files unless they are within GUACAMOLE_HOME. An extremely simple way to solve this would be to symbolically link .guacamole within the Tomcat user's home directory to /etc/guacamole. In the case of the "tomcat7" package on Ubuntu, the Tomcat user's home directory is /usr/share/tomcat7:

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

Alternatively, you could create the .guacamole directory, and make a symbolic link to guacamole.properties instead. Since the location of your user-mapping.xml is explicitly specified within your guacamole.properties, you do not need to place it within GUACAMOLE_HOME:

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

Be sure to restart Tomcat after you make these changes, and things should start working.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!