INSTALLATION ERROR: No custom admin password found variable needed etc

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):

Ubuntu 22.04.3 LTS
Opensearch 2.12.0

Describe the issue:

Hello OS Forum,

Scroll Down to OpenSearch part for context : Ubuntu installation

Error: No custom admin password found. Please provide a password via the environment variable OPENSEARCH_INITIAL_ADMIN_PASSWORD.

This is my first time trying to install. I’ve ran into an issue trying to install OpenSearch via Graylog installation instructions. To confirm this is a requirement for my Graylog installation. It looks like OpenSearch has installed partially

It says to check a specified log. This what I’m seeing (last line which I assume is the issue) I’m stuck at how to correctly perform this step. Any suggestions? Thank you in advance!

### OpenSearch Security Demo Installer
### ** Warning: Do not use on production or public reachable systems **
OpenSearch install type: rpm/deb on Linux 6.5.0-1014-aws amd64
OpenSearch config dir: /etc/opensearch/
OpenSearch config file: /etc/opensearch/opensearch.yml
OpenSearch bin dir: /usr/share/opensearch/bin/
OpenSearch plugins dir: /usr/share/opensearch/plugins/
OpenSearch lib dir: /usr/share/opensearch/lib/
Detected OpenSearch Version: 2.12.0
Detected OpenSearch Security Version: 2.12.0.0
No custom admin password found. Please provide a password via the environment variable OPENSEARCH_INITIAL_ADMIN_PASSWORD.

Hey @OP1

That link is for Graylog.

You may want to look at this document.

Correct. I was supplying the link just for context.

@OP1 As per the logs you must provide initial admin password by setting env variable OPENSEARCH_INITIAL_ADMIN_PASSWORD.
This has been introduced in 2.12.0

Understood. But I’m confused on how to actually perform the task or exactly where. That’s my concern. Sorry I’m new to the process.

@pablo Understood. But I’m confused on how to actually perform the task or exactly where. That’s my concern. Sorry I’m new to the process.

@OP1 As far as I can see, the Graylog documentation directs me to OpenSearch Docuemntation for OpenSearch installation steps.

Please have a look at the documentation shared by @Gsmitt and “Install OpenSearch from a package” section.

@pablo This is what I’m getting back

@OP1 Did you download the .deb file from the OpenSearch Download site?

Also, the password is too simple. OpenSearch 2.12.0 requires a strong password.

Hey @OP1

The error shows “No such file or directory”, that means you need to get the package.

curl -SLO https://artifacts.opensearch.org/releases/bundle/opensearch/2.12.0/opensearch-2.12.0-linux-x64.deb

Then execute.

sudo dpkg -i opensearch-2.12.0-linux-x64.deb

Hey @pablo

Ok I get now, tested this in my lab.

For some reason my command on ubuntu 22.0.4 did not work.

 export OPENSEARCH_INITIAL_ADMIN_PASSWORD=yourStrongPassword123!

Once i download my deb package I configured my env file.

vi /etc/environment

Added config

OPENSEARCH_INITIAL_ADMIN_PASSWORD=yourStrongPassword123!

Logged out and back in with my user.

I also noticed that password is used my my cURL commands now.

1 Like