I am using selenium/standalone-chrome-debug.
By default connecting to the container via VNC will trigger an authentication prompt which can be avoided by setting an environment variable as per the documentation:
If you want to run VNC without password authentication you can set the environment variable VNC_NO_PASSWORD=1.
When I start the container with the following command, I'm still prompted for the password:
docker run -d -p 4444:4444 -p 0:5900 -v /dev/shm:/dev/shm -e VNC_NO_PASSWORD=1 selenium/standalone-chrome-debug
As you can see in the following screencast:
I'm still asked for a password
Trying to authenticate without password fails
When I use the default password (secret), it passes
Question: how do I avoid authentication completely?
Adding
VNC_NO_PASSWORD: 1
to the environment of the relevant service in docker-compose.yml worked for me.
Related
I'm a newbie with docker, today I'm trying to start my docker container with keycloak without success, I haven't made any change to the container and it just doesn't want to start up.
Here is the docker log error:
*** JBossAS process (188) received TERM signal ***
User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
The container is not inside any volume, and it was created using the command
docker run -p 8080:8080 -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin quay.io/keycloak/keycloak:16.1.0
I tried it as well and the user account was not created. I believe that is as a result of the fact that the default 16.x.x and below are all based on wildfly and not quarkus. The new quarkus version supports these environment variables for setting up the initial admin user and is the .x preview version from 16.x.x and below.
It is only from 17.x.x onwards that quarkus is fully supported in the default version and is no longer a .x preview version. Link here
I tested this hypothesis by running the same command but only changing the version of keycloak to 17.x.x and adding the state the server should run in and that run fine. The documentation for this is here
docker run -p 8080:8080 -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin quay.io/keycloak/keycloak:17.0.0 start-dev
Also note that the admin login is now at http://localhost:8080/admin instead of http://localhost:8080/auth in the new version.
I have script that user can change password to ldap. The user write his password and the script is sending the command to ldap server. I can`t do that other way, only this way ldap server creates propper passwords. The command is:
ldappasswd -x -D "uid=userwhocanchangepassword,cn=users,dc=example,dc=org" -w "userpass" -h ldap.host -S 'uid=usertochange,cn=users,dc=example,dc=org' -s 'passwordTochange'
userwhocanchangepassword - is user that has perrmissions to change other users passwords
Autside the container it works perfectly (password is changed) but when I try to run same command in the docker container insted of password change i get ldappasswd help:
Change password of an LDAP user
usage: ldappasswd [options] [user]
user: the authentication identity, commonly a DN
It`s strange but it works well if I delete the -s param with the password. But if I do that command is prompting to pass the password.
On my dev machine and inside the docker container is the same version of the ldappasswd. Docker is ubuntu container with installed ldap-utils.
Is any other way to modify this command, or maybe some one has simillar problem?
Thanks for any help.
How to recreate my problem
Creating the MonetDB Container
I have this setup (using windows with Docker Desktop).
Create the official monetdb docker container with the follwing command:
docker run -v $HOME/Desktop/monetdbtest:/monetdbtest -e 'MONET_DATABASE=docker' -e 'MONETDB_PASSWORD=docker' -p 50000:50000 -d topaztechnology/monetdb:latest
explanation what the command does:
creates a monetdb container with a database called 'docker' and applies the password 'docker' to the default user called 'monetdb'. It also mounts my directory monetdbtest/ into the container.
Testing the container with DBeaver
I test the connection using DBeaver with the following credentials:
JDBC URL: jdbc:monetdb://localhost:50000/docker
host: localhost
port: 50000
Database/schema: docker
username: monetdb
password: docker
this works fine, i am able to connect and can exequte sql queries with dbeaver.
Using mclient within the container to send queries
I enter the container as root with the following command:
docker exec -u root -t -i nostalgic_hodgkin /bin/bash
(replace nostalgic_hodgkin with your randomly generated container name)
2.
I navigate to my mounted directory
cd monetdbtest
then I test the connection with mclient:
mclient -h localhost -p 50000 -d docker
I get asked for user and password, so for user I enter
monetdb and for password I enter docker. It works and I am in the mclient shell, able to execute SQL queries.
3.
Since I don't want to always enter username and password I create a .monetdb file in the monetdbtest/ directory. It looks like this:
user=monetdb
password=docker
Now I should be able to use the mclient command without entering user information. So I type this command:
mclient -h localhost -p 50000 -d docker
However I get the message:
'nvalidCredentialsException:checkCredentials:invalid credentials for user 'monetdb
I did everything according to the mclient manual. Maybe I missed something?
You may need to export the environment variable DOTMONETDBFILE with value /monetdbtest/.monetdb. See the man page for mclient, especially the paragraph before the OPTIONS heading.
In docker mode https://hub.docker.com/r/jboss/keycloak
docker run -e KEYCLOAK_USER=<USERNAME> -e KEYCLOAK_PASSWORD=<PASSWORD> jboss/keycloak
All working only via localhost:8080
If we try to access https://custom.com/auth/admin/master/console, we get a white page (access only from localhost).
How change domain to custom.com? (in documentations only change file, but in docker not have possible. Need stateless solutions)
Any idea without mounting file.
Need add -e PROXY_ADDRESS_FORWARDING=true for access to keyloack admin from https://custom.com (not localshost:8080)
I am trying to create a rabbitmq docker container with default user and password but when I try to enter to the management plugin those credentials doesn't work
This is how I create the container:
docker run -d -P --hostname rabbit -p 5009:5672 -p 5010:15672 --name rabbitmq -e RABBITMQ_DEFAULT_USER=user -e RABBITMQ_DEFAULT_PASS=pass -v /home/desarrollo/rabbitmq/data:/var/lib/rabbitmq rabbitmq:3.6.10-management
What am I doing wrong?,
Thanks in advance
The default user is created only if the database does not exist. Therefore the environment variables have no effect if the volume already exists.
I had the same problem when trying to access in Chrome. Firefox worked fine. The culprit turned out to be a deprecated JS method that was no longer allowed by Chrome.