Opensourcetechブログ

OpensourcetechによるNGINX/Kubernetes/Zabbix/Neo4j/Linuxなどオープンソース技術に関するブログです。

Neo4j の ユーザー管理

 

こんにちは、LinuCエバンジェリストこと、鯨井貴博@opensourcetechです。

Neo4j開発メンバーと一緒

 

今回は、以下にある Neo4j Community Edition のユーザー管理を確認してみます。

neo4j.com

なお、Neo4j のインストールがまだの方は、以下などを参考に行ってください。

グラフデータベース(GraphDB)のneo4jを使ってみる! - Opensourcetechブログ

また、Projectがない方は以下の方法で作成します。

Neo4j Projectの始め方から Graphの開始まで - Opensourcetechブログ

 

 

Current Userの情報参照

コマンド操作は、以下の上部にある「$」に続いて入力します。

f:id:opensourcetech:20180903183608p:plain

CALL dbms.showCurrentUser()

入力後は、右側にある三角形のマークでコマンドを実行します。

f:id:opensourcetech:20180903183645p:plain

実行結果は、以下の通り。

f:id:opensourcetech:20180903183642p:plain

 

 

Current Listの確認

CALL dbms.security.listUsers()

f:id:opensourcetech:20180903183652p:plain

ユーザー一覧が表示されます。

f:id:opensourcetech:20180903183647p:plain

 

 

Userの追加

CALL dbms.security.createUser("testuser", "password", True)

testuser・・・・作成するユーザー名

password・・・ユーザーのパスワード

True・・・・・・初回ログイン時にパスワードの変更が必要かどうか

                            ※デフォルトはTrueでその場合、パスワードを変更するまで他の操作ができないようになります。

f:id:opensourcetech:20180903184237p:plain

ユーザー追加。

f:id:opensourcetech:20180903184243p:plain

User Listをみても、ユーザーが追加されています。

f:id:opensourcetech:20180903184252p:plain

 

なお、ユーザー名とパスワードの箇所に 「"(カンマ)」などを忘れると、以下のようにエラーとなるので注意。

f:id:opensourcetech:20180903184302p:plain

 

 

Current Userのパスワード変更

CALL dbms.security.changePassword("neo4j")

neo4jは、変更後のパスワードとなります。

f:id:opensourcetech:20180903184947p:plain

f:id:opensourcetech:20180903184949p:plain

 

 

Userの削除

CALL dbms.security.deleteUser("testuser")

testuserは、削除対象のユーザー名。

f:id:opensourcetech:20180903185105p:plain

f:id:opensourcetech:20180903185108p:plain

削除できました。

f:id:opensourcetech:20180903185111p:plain

 

 

 

 

 

 

www.slideshare.net

github.com

www.facebook.com

twitter.com

www.instagram.com

 

 

にほんブログ村 IT技術ブログ Linuxへ
Linux

にほんブログ村 IT技術ブログ オープンソースへ
オープンソース

 

 

Opensourcetech by Takahiro Kujirai