From a2f126de7b67bf0d685eeca660eda7386b64cd2a Mon Sep 17 00:00:00 2001 From: NataliaIvakina <82437520+NataliaIvakina@users.noreply.github.com> Date: Wed, 16 Apr 2025 08:17:12 +0200 Subject: [PATCH 1/2] Fix the path and name of `metadata_script.cypher` (#2266) --- .../pages/authentication-authorization/manage-users.adoc | 6 +++--- modules/ROOT/pages/backup-restore/restore-backup.adoc | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/ROOT/pages/authentication-authorization/manage-users.adoc b/modules/ROOT/pages/authentication-authorization/manage-users.adoc index 3d1c533df..8b777ccf6 100644 --- a/modules/ROOT/pages/authentication-authorization/manage-users.adoc +++ b/modules/ROOT/pages/authentication-authorization/manage-users.adoc @@ -784,7 +784,7 @@ The `'password'` can either be a string value or a string parameter with default The `PLAINTEXT` and `ENCRYPTED` keywords are optional and can be used to specify the format of the password, i.e. whether Neo4j needs to hash it or it has already been hashed. By default, all passwords are encrypted (hashed) when stored in the Neo4j `system` database. * The optional `PLAINTEXT` in `SET PLAINTEXT PASSWORD` has the same behavior as `SET PASSWORD`. -* The optional `ENCRYPTED` is used to recreate an existing user when the plaintext password is unknown, but the encrypted password is available in the _data/scripts/databasename/restore_metadata.cypher_ file of a database backup. +* The optional `ENCRYPTED` is used to recreate an existing user when the plaintext password is unknown, but the encrypted password is available in the _data/databases/databasename/tools/metadata_script.cypher_ file of a database backup. See xref:backup-restore/restore-backup#_restore_users_and_roles_metadata[Restore users and roles metadata]. + With `ENCRYPTED`, the password string is expected to be in the format of `,,`, where, for example: ** `0` is the first version and refers to the `SHA-256` cryptographic hash function with iterations `1`. @@ -853,7 +853,7 @@ SET AUTH 'native' {SET PASSWORD 'abcd1234' SET PASSWORD CHANGE REQUIRED} .Create user with an encrypted password ====== -Or you can create the user `Jake` in an active state, with an encrypted password (taken from the _data/scripts/databasename/restore_metadata.cypher_ of a database backup), and the requirement to not change the password by running: +Or you can create the user `Jake` in an active state, with an encrypted password (taken from the _data/databases/databasename/tools/metadata_script.cypher_ of a database backup), and the requirement to not change the password by running: [source,cypher,role=noplay] ---- @@ -1012,7 +1012,7 @@ The `'password'` can either be a string value or a string parameter with default The `PLAINTEXT` and `ENCRYPTED` keywords are optional and can be used to specify the format of the password, i.e. whether Neo4j needs to hash it or it has already been hashed. By default, all passwords are encrypted (hashed) when stored in the Neo4j `system` database. * The optional `PLAINTEXT` in `SET PLAINTEXT PASSWORD` has the same behavior as `SET PASSWORD`. -* The optional `ENCRYPTED` is used to recreate an existing user when the plaintext password is unknown, but the encrypted password is available in the _data/scripts/databasename/restore_metadata.cypher_ file of a database backup. +* The optional `ENCRYPTED` is used to recreate an existing user when the plaintext password is unknown, but the encrypted password is available in the _data/databases/databasename/tools/metadata_script.cypher_ file of a database backup. See xref:backup-restore/restore-backup#_restore_users_and_roles_metadata[Restore users and roles metadata]. + With `ENCRYPTED`, the password string is expected to be in the format of `,,`, where, for example: ** `0` is the first version and refers to the `SHA-256` cryptographic hash function with iterations `1`. diff --git a/modules/ROOT/pages/backup-restore/restore-backup.adoc b/modules/ROOT/pages/backup-restore/restore-backup.adoc index 64889d941..9f30a2f02 100644 --- a/modules/ROOT/pages/backup-restore/restore-backup.adoc +++ b/modules/ROOT/pages/backup-restore/restore-backup.adoc @@ -296,16 +296,16 @@ For more information, see xref:clustering/databases.adoc#cluster-seed[Designated If you have backed up a database with the option `--include-metadata`, you can manually restore the users and roles metadata. -From the __ directory, you run the Cypher script _data/scripts/databasename/restore_metadata.cypher_, which the `neo4j-admin database restore` command outputs, using xref:tools/cypher-shell.adoc[Cypher Shell]: +From the __ directory, you run the Cypher script _data/databases/databasename/tools/metadata_script.cypher_, which the `neo4j-admin database restore` command outputs, using xref:cypher-shell.adoc[][Cypher Shell]: *Using `cat` (UNIX)* [source, shell, role=nocopy noplay] ---- -cat data/scripts/databasename/restore_metadata.cypher | bin/cypher-shell -u user -p password -a ip_address:port -d system --param "database => 'databasename'" +cat data/databases/databasename/tools/metadata_script.cypher | bin/cypher-shell -u user -p password -a ip_address:port -d system --param "database => 'databasename'" ---- *Using `type` (Windows)* [source, shell, role=nocopy noplay] ---- -type data\scripts\databasename\restore_metadata.cypher | bin\cypher-shell.bat -u user -p password -a ip_address:port -d system --param "database => 'databasename'" +type data\databases\databasename\tools\metadata_script.cypher | bin\cypher-shell.bat -u user -p password -a ip_address:port -d system --param "database => 'databasename'" ---- From 88ac0a03ab06b47466d4a5c11ec1272c74f91a9d Mon Sep 17 00:00:00 2001 From: NataliaIvakina <82437520+NataliaIvakina@users.noreply.github.com> Date: Wed, 16 Apr 2025 08:49:13 +0200 Subject: [PATCH 2/2] Update modules/ROOT/pages/backup-restore/restore-backup.adoc --- modules/ROOT/pages/backup-restore/restore-backup.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/backup-restore/restore-backup.adoc b/modules/ROOT/pages/backup-restore/restore-backup.adoc index 9f30a2f02..f5ba64c8e 100644 --- a/modules/ROOT/pages/backup-restore/restore-backup.adoc +++ b/modules/ROOT/pages/backup-restore/restore-backup.adoc @@ -296,7 +296,7 @@ For more information, see xref:clustering/databases.adoc#cluster-seed[Designated If you have backed up a database with the option `--include-metadata`, you can manually restore the users and roles metadata. -From the __ directory, you run the Cypher script _data/databases/databasename/tools/metadata_script.cypher_, which the `neo4j-admin database restore` command outputs, using xref:cypher-shell.adoc[][Cypher Shell]: +From the __ directory, you run the Cypher script _data/databases/databasename/tools/metadata_script.cypher_, which the `neo4j-admin database restore` command outputs, using xref:tools/cypher-shell.adoc[Cypher Shell]: *Using `cat` (UNIX)* [source, shell, role=nocopy noplay]