Apache NIFI login issue after installation - apache-nifi

I am new to Apache NIFI. I have installed Apache NIFI on my local windows machine. Now, It is asking user's name and password to login. Do you know where I can find or set the password? I did not set any user name and password during installation. I much appreciate the response as soon as possible. Please have a look at the image attachment-> Nifi login requires a user name and password

First you go to the "conf/login-identity-providers.xml" file
There if u see something like below
<provider>
<identifier>single-user-provider</identifier>
<class>org.apache.nifi.authentication.single.user.SingleUserLoginIdentityProvider</class>
<property name="Username">3489c555-49b4-4e7d-9e6f-ca7f71abea81</property>
<property name="Password">25BiJ9913n8q68bPGRxrm0qY6C4Z/GbT</property>
</provider>
Then make username & password property empty like below
<provider>
<identifier>single-user-provider</identifier>
<class>org.apache.nifi.authentication.single.user.SingleUserLoginIdentityProvider</class>
<property name="Username"></property>
<property name="Password"></property>
</provider>
Then save the login-identity-providers.xml file and restart the NIFI
After it starts open logs/nifi-app.log file
Then you can able to see generated usename and password like below.
Generated Username [3489c734-49b4-4e7d-9e6f-ca7f79abea81]
Generated Password [25BiJ9911n8k68btGRxqm0qY6C4Z/GbT]
Use this for login. Thank u.

As the official GitHub gives
https://github.com/apache/nifi#authenticating
you can find username and password in .\logs\nifi-app.log use search "password"
and you will see this
I try change password in windows but failed, but it can be done in Linux.
./bin/nifi.sh set-single-user-credentials <username> <password>

You can change the default password using the following (assuming path to nifi is D:\nifi-1.15.0)
java -cp d:\nifi-1.15.0\lib\bootstrap\* -Dnifi.properties.file.path=D:\nifi-1.15.0\conf\nifi.properties org.apache.nifi.authentication.single.user.command.SetSingleUserCredentials username password

Go To *nifi-1.15.2\logs*
open nifi-app.log and search for USERNAME, Copy it and paste it there
Username and Password

It will have some auto-generated credentials to use by default. You'll see them in the nifi-app.log
Generated Username [USERNAME]
Generated Password [PASSWORD]

This is my docker-compose file:
version: "3"
services:
nifi:
image: apache/nifi
container_name: nifi
volumes:
- /home/my_user/nifi/conf:/opt/nifi/conf
ports:
- 8443:8443
environment:
- NIFI_WEB_HTTPS_PORT:8443
- NIFI_WBE_HTTP_HOST=my_ip
- NIFI_WEB_PROXY_HOST=my_ip:8443
- SINGLE_USER_CREDENTIALS_USERNAME:admin
- SINGLE_USER_CREDENTIALS_PASSWORD:ransom_pwd
restart: always
but the login was not working. So I had to SSH into docker container
then cd into /opt/nifi/bin and then run ./nifi.ssh set-single-user-credentials username password

Related

NiFi - Not Seeing user/password in nifi-app.log

In Windows, I've downloaded, installed, and started NiFi 1.16.3.
However when it asks me for a User and Password, I don't see these in nifi-app.log.
Is there a default User/Password?
Thanks
John
if you are on linux just run this command to set custom user/password for single user nifi:
cd <nifi_root_folder>
./bin/nifi.sh set-single-user-credentials <username> <password>
for windows there is a workaround to set custom credentials:
cd <nifi_root_folder>
java -cp conf;lib\bootstrap\* -Dnifi.properties.file.path=conf/nifi.properties ^
org.apache.nifi.authentication.single.user.command.SetSingleUserCredentials ^
<username> <password>
if you start a plain new nifi instance you will find the username and password in logs/nifi-app.log.
somewhere should be printed a line like this:
Generated Username [ae7b6dd8-bc89-44b0-a025-abe1230e6327]
Generated Password [DPwOASAEiXKHKAtR6CuzfNrRIVH+iU4o]

Apache NiFi - login issue when entering username and password

I installed Apache NiFi locally. (https://localhost:8443/nifi).
I set up the config:
<provider>
<identifier>single-user-provider</identifier>
<class>org.apache.nifi.authentication.single.user.SingleUserLoginIdentityProvider</class>
<property name="Username">test#gmail.com</property>
<property name="Password">123456789011</property>
</provider>
But when I try to log in (UI), I have an issue: The supplied username and password are not valid.
I use ./nifi.sh set-single-user-credentials command to set up the username and password.
What should I do to resolve this issue?
In windows OS, after restart, it worked charming!

Bitnami cassandra application password

I created bitnami cassandra on EC2.
The documentation says that
The administrator user name is cassandra and you can get the password from the server dashboard for your server.
But it is not found when I get the system log.
I do find though a message that says
Not setting Bitnami application passwords
How to obtain the same?
Here are some more info: (default cassandra password is the same as application password)
https://docs.bitnami.com/virtual-machine/faq/#how-to-find-application-credentials
if you check this picture, you can see where you need to look:
https://docs.bitnami.com/images/img/platforms/virtual-machine/app-credentials-1bc7e819.png
For the bitnami-cassandra-3.10-0-linux-ubuntu-14.04.3-x86_64-ebs (ami-32a71751) image,
I found
default username : cassandra
default password: bitnami
It is not as per the documentation. I hope it might help who were facing the same issue.
Bitnami developer here,
If you launched the machine on EC2, you should follow this guide instead:
https://docs.bitnami.com/aws/faq/get-started/find-credentials/
You also could check the password by accessing via SSH and running:
sudo cat /opt/bitnami/var/log/pre-start.log | grep "application password"
User is cassandra by default.
I hope it helps

Where do i see postgres username and password

I have installed Postgres with Homebrew, and it didn't ask me to setup any username and password. Now I am having troubles connect the ruby project with db. I don't know what username and password to use in config file.
I checked my pg_hba.conf file, all methods are set to trust, and user is mostly set to all or my profile name.
When I start Rails, the server starts and then gives PG::ConnectionBad error.
I am new to Ruby and all this and would appreciate some help.
I am not sure if you checked any docs before posting, default user is postgres, but check if postgres service is running ps aux | grep postgres and follow this doc to perform all required setup. First steps are also worth your attention.

What is the default password for Postgres

I have just install Postgres 9.3 on Windows 7. The installation completed successfully. It has never asked me to provide the password for postgres user.
The service postgresql-x64-9.3 is up and running. However, I cannot connect: I do not not know the password. I've found the following answer, but it did not help:
similar question on Ubuntu
[LINUX]
might work for windows too
After installing postgres follow following steps in order to setup password for default system account of Linux execute following in terminal:
user:~$ sudo -i -u postgres
postgres#user:~$ psql
after executing above two commands you will get into postgres shell
Execute this query in postgres shell:
postgres=# ALTER USER postgres PASSWORD 'mynewpassword';
your new password is 'mynewpassword' without quotes and now you can connect with external GUI tools like DBeaver
WARNING: trust means exactly that. Anyone who can connect to the PostgreSQL server can control it. If you set trust mode that allows superusers like user postgres (or all users) to connect, they get total control of your PostgreSQL and can probably run shell commands too. You should usually only use it to change the password then restore the configuration back to the auth mode you were using before.
If you used an unattended installer script, the password will be in the script or associated config file.
Otherwise, treat it the same as if you lost/forgot the password rather than never knowing it:
Edit pg_hba.conf, setting the auth mode to trust instead of the default md5
In the Services control panel restart the PostgreSQL service
Connect with psql or PgAdmin or whatever
ALTER USER postgres PASSWORD 'mynewpassword';
Edit pg_hba.conf again and set the auth mode back to md5
Restart PostgreSQL again
pg_hba.conf is in your data directory. By default it'll be %PROGRAMFILES%\PostgreSQL\9.3\data.
To edit it you'll have to use the security tab to give yourself read/write permissions (via a UAC prompt). This might require you to set yourself as the owner of the file.
On unix systems it's more secure to prepend a
local all all peer
line to pg_hba.conf and then sudo -u postgres psql (assuming your PostgreSQL server runs as user postgres) to get an interactive psql session without using a password. That way you don't have to use trust.
On initialisation you can access the DB as:
Username: postgres
Password: postgres
By default user postgres does not have a password
Start psql and create a password:
sudo -u postgres psql
\password postgres - It will ask you enter a password for user postgres
Through trial and error I found that the password for Postgre SQL 10 for the username postgres is "admin". I kept typing in different password until I reached that password. I am using pgAdmin 4 to test out my SQL Statements, POSTGRE SQL 10 is the first server connection set up using localhost.
It seems there was no default password, but psql wouldn't accept a lack of a password (fe_sendauth: no password supplied). To get around this, I opened pgAdmin, then in the left sidebar:
Servers
Login/Group Roles
Right click postgres and click Properties,
Go to Definition tab
Set the password in the Password field
After saving, psql accepted that password. There may have been a switch I could have supplied to have it accept a lack of a password (--no-password?), but the user should probably have a password anyways, so this seemed reasonable.
go to control >> computer management >> Locaol users and group >> users >>
right click on openpgsvc >> set password.
after that now you can access with this password on openpgsvc
The simplest solution I've found is just to install PgAdmin and connect to the local server with the current Windows credentials (username + password). Then you can change the password to the postgres user.
step1: Go to control panel
Step2: Click on Administrative Tools
Step3: Click on Computer Management
Step4: There under "Local Users and Groups" Double click on user
Step:5: then right click on postgres and you can set password
refer this below image

Resources