Cannot login to keycloak admin console when running in domain cluster mode - keycloak

Following the documentation guide, I have booted up a master and slave and I can see it connected via the logs:
Boot up master
$ domain.sh --host-config=host-master.xml
Boot up slave
$ domain.sh --host-config=host-slave.xml
I've also followed the steps to set up the admin user via the add-user.sh. Further research indicated that I should use the add-user-keycloak.sh script to add an initial admin user:
./add-user-keycloak.sh -u john
Press ctrl-d (Unix) or ctrl-z (Windows) to exit
Password:
Added 'john' to '../standalone/configuration/keycloak-add-user.json', restart server to load user
Reran the master and slave, but cannot login to admin console.
However, what's interesting is when I tried to boot up in standalone mode I was able to the admin console as john:
./standalone.sh
Is this a bug or am I missing something (most likely) that's not in the documentation?
Thanks in advance...

Figured it out, hope this helps somebody.
Before you start in domain cluster mode:
./domain --host-config=host-master.xml
./domain --host-config=host-slave.xml
you must first create the admin so you can log in to admin console using the --sc tag, otherwise add-user-keycloak.sh only adds the admin user for the standalone mode. To do that:
./add-user-keycloak.sh --sc ../domain/servers/server-one/configuration -u john -p password
if configuration folder does not exist, then create the directory.

The ./add-user-keycloak.sh script seems to be a little outdated. Currently (as of Keycloak 12.0.2 version) it creates keycloak-add-user.json file in ./domain/configuration/ directory - That is wrong!
The file should be in ./domain/servers/server-one/configuration.
Now you just have to move the file to that directory, restart the server and it should work properly.
I found this solution on this 2-year old email thread:
https://lists.jboss.org/pipermail/keycloak-user/2018-January/012642.html

Related

Not able to create a admin user in Git Lab server

I have installed gitlab server using docker compose but after the installation I am not getting a default screen where we create first Admin user. Instead of that it is asking me to enter username and password.
If I see this correctly, the gitlab_root_password should be set in the Compose file. This should then be used to log in for the first time.
Source: https://docs.gitlab.com/ee/install/docker.html#install-gitlab-using-docker-swarm-mode

Can't create user for ceph dashboard

I'm trying to create a user for ceph dashboard with admin role. Version is Nautilus 14.2.19 and deployed with manuel installation.
I've installed dashboard module, installed all dependencies and enabled it. My dashboard is reachable from the monitor ip and default port of 8443.
When I run te command:
ceph dashboard ac-user-create <user> <pw> administrator
I get the following error:
Please specify the file containing the password/secret with "-i" option.
After digging for information about this it says there must be a file in bcrypt format. Is there a default created file for this? Or if it's needed to create one how can I do it?
Nevermind, it seems you just need to create a text file and write your password in it.
When you run the command like this:
ceph dashboard ac-user-create <user> -i /file/location administrator
It creates the user and applies the password in an encrypted format.

Unable to run OTRS daemon, OTRS6 on Cent OS 7

I am facing issue while trying to start ORTS daemon on CentOS linux
FACILITY:
OTRS-otrs.Daemon.pl - Daemon
Kernel::System::Daemon::DaemonModules::SystemConfigurationSyncManager-07
MESSAGE:
Access denied for user 'otrs'#'localhost' (using password: YES)
When I am trying get the status using command:
./opt/otrs/bin/otrs.Daemon.pl status
getting this message:
Manage the OTRS daemon process.
Daemon running
But when I go to the web page it says that OTRS Daemon is not running.
Any help is appreciated!?
The error comes from the mysql daemon and has nothing to do with Perl. Try this on the command-line on the server running otrs:
mysql --user=otrs --host=localhost --password=XXXXXXX
That will probably fail with the same error. Once you have fixed your mysql configuration so that the command succeeds, otrs should also start.
Omit the option --password and let mysql prompt you for the password, if you are not alone on the machine.
Another reason for the failure could, of course, be that you have misconfigured otrs, and you have to change the mysql user, host, or password.
After searching for solution for two days i finally get it working.
I first change to /opt/otrs/bin/ directory.
To get the daemon working, you have to start the daemon as otrs user.
To do that just change user to otrs : you can use this command. (su otrs) from your terminal, you will be prompted for the password for otrs. Just enter the password and use the (whoami) command to check if you are otrs. If it shows that the current user is otrs issue this command (./otrs.Daemon.pl status) to see the current status of the daemon. if it shows that the daemon not running then issue this command (./otrs.Daemon.pl start).

Rundeck sudo-prompt-pattern

I configured project with privateKey authentication. I have server and one node, where i can run all operations, which doesn't require sudo. On the node i have user test, who can run commands with sudo. I'm using this user for running jobs from server on node. When i run the job i get response from node, that i need to type password for user test. There is configuration in rundeck, which allows automate this process. Here is how my project.properties file looks:
#Project Test configuration, generated
#Tue Dec 08 10:52:45 UTC 2015
project.name=Test
resources.source.1.config.requireFileExists=false
project.ssh-authentication=privateKey
resources.source.1.config.includeServerNode=true
resources.source.1.config.generateFileAutomatically=true
resources.source.1.config.format=resourcexml
resources.source.1.config.file=/home/vagrant/projects/Test/etc/resources.xml
project.ssh-keypath=/opt/test/keys/test_prv_key
project.description=Test project
resources.source.1.type=file
sudo-command-enabled=true
sudo-password-storage-path=/home/vagrant/var/storage/content/keys/test.password
sudo-prompt-pattern='^\[sudo\] password for .+:.*'
The problem is, that rundeck doesn't match the pattern for sudo command and connection is dropped in 3s after asking the password.
Upd.
Did not find solution, therefore give user access to sudo without password (NOPASSWD in sudoers)
I encountered a similar problem and after trying every combination of configuration options specified in the documentation I gave up and used this hack instead:
echo #option.sudoPassword# | sudo -S my_command
Try to apply the below config in "/etc/rundeck/project.properties"
project.sudo-command-enabled=true
project.sudo-command-pattern=^sudo$

Mac OS loading XAMPP prompts password

I am using Lion 10.8.2, and in sudoers i made like this: username ALL=(ALL) NOPASSWD, the username is my computer user... but still now prompts password.. What to do ?
If you are talking about the Pop Up window while starting the servers then you cannot get away with it. An API(Don't know which exactly) is used to start the Apache server which requires administrator privileges. sudo in the terminal and this API call is different, editing any files won't help.
Port 80, default port of Apache is a Well-Known port which requires admin privileges as written in the link. So they must have forcefully added the API Call for starting the server.