Skip to content

Commit

Permalink
Delete the original admin from the internal_users.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Liang <[email protected]>
  • Loading branch information
RyanL1997 committed Oct 3, 2023
1 parent f63b081 commit 91726a3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
7 changes: 0 additions & 7 deletions config/internal_users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@ _meta:

## Demo users

admin:
hash: "$2a$12$VcCDgh2NDk07JGN0rjGbM.Ad41qVR/YFJcgHp0UGns5JDymv..TOG"
reserved: true
backend_roles:
- "admin"
description: "Demo admin user"

anomalyadmin:
hash: "$2y$12$TRwAAJgnNo67w3rVUz4FIeLx9Dy/llB79zf9I15CKJ9vkM4ZzAd3."
reserved: false
Expand Down
3 changes: 0 additions & 3 deletions tools/install_demo_configuration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,6 @@ echo 'plugins.security.system_indices.indices: [".plugins-ml-config", ".plugins-
ADMIN_PASSWORD_FILE="$OPENSEARCH_CONF_DIR/initialAdminPassword.txt"
INTERNAL_USERS_FILE="$OPENSEARCH_CONF_DIR/opensearch-security/internal_users.yml"

# Use sed to delete the block
sed -i.bak '/^admin:/,/description: "Demo admin user"/d' $INTERNAL_USERS_FILE

if [[ -n "$initialAdminPassword" ]]; then
ADMIN_PASSWORD="$initialAdminPassword"
elif [[ -f "$ADMIN_PASSWORD_FILE" && -s "$ADMIN_PASSWORD_FILE" ]]; then
Expand Down

0 comments on commit 91726a3

Please sign in to comment.