pass kinit a custom krb5.conf file - kerberos

I'm using kinit to log into a server that my sys admin didn't anticipate us using. It seems that the default location for the config file is /etc/krb5.conf, but I don't have root access so I can't edit this file to add a new server. How can I pass kinit a custom config file?

OK, solved the problem: the default config file location can be overridden by setting the KRB5_CONFIG environment variable

I had the same issue today. Here's the command that worked for me, for future reference:
env KRB5_CONFIG=/path/to/custom/krb5.conf kinit <your..args..here>

Try using
on Win
-Djava.security.krb5.conf=C:/IBM/IBMSSO/krb5.ini
on non Win
-Djava.security.krb5.conf=/opt/IBM/IBMSSO/krb5.conf
Example on Windows (with IBM Java)
java -Djava.security.krb5.conf=C:/IBM/IBMSSO/krb5.ini com.ibm.security.krb5.internal.tools.Kinit -k -t C:/IBM/IBMSSO/SSOICNTilo.keytab HTTP/myserver.123.com#123.COM

Related

Unable to run Grafana server on local system

I have to create a plugin for Grafana. For that i cloned the code from Github and followed this. I have managed to build the grafana but having issue in running the server. I am getting the error
Grafana-server Init Failed: Could not find config defaults, make sure homepath command line parameter is set or working directory is homepath
I did find this issue at issue. I have copied the "sample.ini" and re-named it to "custom.ini" and used the following commands in the bin folder made after building the grafana
.\grafana-server.exe --config D:\Go-UpdatedWorkSpace\grafana\conf\custom.ini
.\grafana-server.exe D:\Go-UpdatedWorkSpace\grafana\conf\custom.ini
.\grafana-server.exe -config D:\Go-UpdatedWorkSpace\grafana\conf\custom.ini
.\grafana-server.exe -config "D:\Go-UpdatedWorkSpace\grafana\conf\custom.ini"
.\grafana-server.exe --config "D:\Go-UpdatedWorkSpace\grafana\conf\custom.ini"
.\grafana-server.exe "D:\Go-UpdatedWorkSpace\grafana\conf\custom.ini"
But non of them worked. I am still getting the error
Grafana-server Init Failed: Could not find config defaults, make sure homepath command line parameter is set or working directory is homepath
What am i doing wrong ? I am new to Grafana development, any help would be much appreciated.
I have managed to resolve the issue. I ran the Grafana locally by using following command
./grafana-server.exe -config "D:\Go-UpdatedWorkSpace\grafana\conf\defaults.ini" -homepath "D:\Go-UpdatedWorkSpace\grafana".
I executed this command on the "bin" folder created after building the grafana with GoLang. (There is also a bin folder inside the homepath directory, i think we can use any of then "bin" folder). Issue was that i was not providing "homepath" in the command. "homepath" is the directory where grafana code is cloned.
In case someone looking for Mac, the below works. I tried with grafana version 8.x . For default install, No need to give -config as -homepath should take care. this could run from any location.
/grafana-install-path/bin/grafana-server -homepath /grafana-install-path web

Visual Studio Code Remote SSH uses Windows username instead of username in ssh_config

I'm using Visual Studio Code on Windows 7, along with Microsoft's Remote SSH extension. I added new remote host, and saved configuration in ssh_config file.
When I open that file, everything looks ok, both User and Host values. However, when extension asks me for a password, I can see that it doesn't use myuser#myremotehost.com , values that are written in ssh_config files, instead it uses proper host but it also uses my windows username instead of the username I set in ssh_config file.
Any solutions to that?
I found that including the username in the Host definition of the .ssh config file fixed it for me.
Edit the contents of C:/Users/me/.ssh/config
from:
Host bar
User foo
HostName bar
ForwardAgent yes
to:
Host foo#bar
User foo
HostName bar
ForwardAgent yes
I had the same problem, and what fixed it for me was disabling remote.SSH.useLocalServer in VS Code's settings.
Source: https://github.com/microsoft/vscode-remote-release/issues/2512
Edit: fix link.
I found the problem. When using Command Palette and running Remote-SSH: Connect to host, you can add your host, and then save it for future use. Now, when saving config, it will ask you which file do you want to save your configuration to, and I was presented with 2 options:
ssh_config(which is in ProgramData)
config(which is in Windows/Users/MYUSER/.ssh/)
Now, I first tried latter, but it couldn't find the file, so I went with former, ie ssh_config. That's why I had this problem.
To fix it, I went to Windows/Users/MYUSER/.ssh/ and created a blank file there. After that, I added new host, saved it to newly created config file, and, voila, everything works as expected.
I tried the following steps as I use Windows 10:
Install the Windows OpenSSH Client
Install the Windows OpenSSH Server
Run the VS Code as Administrator
and it works.
what I have done was this:
1- Add new host : ssh user_name#IP_Adrress
2- Select connect to host and it worked like a charm

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

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

How run Odoo 9.0 from source code in Windows 10

i want to run odoo 9.0 directly from source code in windows 10. I done this:
1.- I downloaded source code from [GitHub][1]
2.- I already installed all system requirements (Python 2.7, Node.js, etc)
3.- I already have an postgresql database in AWS (RDS)
My problem is when i run odoo.py and i open this url (http://localhost:8069/web/), it show me an empty screen.
Here is my startup code:
Python odoo.py --db_host VALID-URL.us-east-1.rds.amazonaws.com -r USERNAME -w PASSWORD -d DATABASENAME --addons-path=addons
¿What i am doing wrong?
just add the option --debug to your command to get debug debug infos
or
you will find a file named odoo.conf (v9 -> v11) or openerp-server.conf (v7 or less)
search for debug_mode = false and set them to true.
I think I had this problem and needed to install node js, and npm less

Supervisord: How to use the hostname in a startup command

is it possible to somehow use the local hostname in a supervisord startup script?
I need it to pass the jmx host to a java-Program.
Example:
command=HOSTNAME=foo.bar /usr/local/rvm/bin/jruby-1.7.1 script/trinidad.rb --threadsafe -f config/trinidad_user_production.rb
I see no easy option so far.
Best,
Tobias
For using hostname in the config file:
%(host_node_name)s
environment=HOSTNAME=foo.bar should work without any issues.
See: http://supervisord.org/subprocess.html#subprocess-environment