# Setting of NEO4J\_AUTH does not work in

**URL:** <https://community.neo4j.com/t/setting-of-neo4j-auth-does-not-work-in/12890>\
**Category:** Docker\
**Created:** [December 16, 2019, 7:17pm UTC](https://community.neo4j.com/t/setting-of-neo4j-auth-does-not-work-in/12890 "2019-12-16T19:17:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JakubMatejka](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/jakubmatejka/32/8018_2.png) [@JakubMatejka](https://community.neo4j.com/u/JakubMatejka)\
**Post date:** [December 16, 2019, 7:17pm UTC](https://community.neo4j.com/t/setting-of-neo4j-auth-does-not-work-in/12890/1 "2019-12-16T19:17:35Z")

</div>

Hi,  
I want to run the neo4j container with initialized data on Amazon ECS. So I extend the `neo4j` docker image, setup and run the data import and then run the original entry point. The problem is that the `neo4j` user keeps its default password (`neo4j`) and its setting using `NEO4J_AUTH` env var does not work.

My Dockerfile looks like this:

```auto
FROM neo4j
ENV NEO4J_AUTH=neo4j/graphPass
ENV JAVA_OPTS='-server -Xms2g -Xmx2g'

RUN curl -sL https://deb.nodesource.com/setup_13.x | bash -
RUN curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt -y update && \
  apt -y upgrade && \
  apt-get install -y nodejs yarn tar

WORKDIR /code

COPY ./ /code

RUN chown -R neo4j:neo4j /code

RUN yarn install
RUN ./node_modules/.bin/webpack --config ./webpack.config.js

```

And the container is run with command from this bash script: (The node.js script basically downloads the data and imports them by calling `neo4j-admin import`.)

```auto
#!/bin/bash

node ./dist/init-data.js
/sbin/tini -gs -- /docker-entrypoint.sh neo4j

```

I can't run change the password by running `cypher-shell -u neo4j -p neo4j "CALL dbms.security.changePassword('graphPass');"` in the script because the neo4j server isn't started yet so I'm quite clueless.

---

<div class="post-metadata">

**Author:** ![maciej.krzywdaa](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/maciej.krzywdaa/32/15739_2.png) [@maciej.krzywdaa](https://community.neo4j.com/u/maciej.krzywdaa)\
**Post date:** [January 13, 2020, 2:57pm UTC](https://community.neo4j.com/t/setting-of-neo4j-auth-does-not-work-in/12890/2 "2020-01-13T14:57:52Z")

</div>

Hi @JakubMatejka,

```auto
RUN ./node_modules/.bin/webpack --config ./webpack.config.js

```

If I good understand you want run this script in background?  
Maybe try using ENTRYPOINT? but first check process on your container and sure that working, if working, next check docker logs and put there.

Please also put error after:

```auto
cypher-shell -u neo4j -p neo4j "CALL dbms.security.changePassword('graphPass');"

```

---

<div class="post-metadata">

**Author:** ![JakubMatejka](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/jakubmatejka/32/8018_2.png) [@JakubMatejka](https://community.neo4j.com/u/JakubMatejka)\
**Post date:** [January 15, 2020, 1:15pm UTC](https://community.neo4j.com/t/setting-of-neo4j-auth-does-not-work-in/12890/3 "2020-01-15T13:15:44Z")

</div>

Hi Maciej,  
I've managed to change the password by calling

`/var/lib/neo4j/bin/neo4j-admin set-initial-password "graphPass"`

in the bash script, so it is working fine now.

Thanks.  
Jakub
