Nexus `admin.password` file is missing in version 3.28.1
Asked Answered
S

3

10

I've created a Nexus server using the official Docker image from Sonatype. My version is 3.28.1 and I can't find admin password or admin.password file in the usual place.

cat /opt/sonatype/sonatype-work/nexus3/admin.password

I've also tried default admin password admin123 and it did not work?

I could not find any release notes about this change and I would like to know where to find the admin password.

Thanks in advance.

Spector answered 2/1, 2021 at 1:4 Comment(2)
Any update? I have the same issue.Interclavicle
docker exec -it nexus cat /nexus-data/admin.passwordIntercom
S
3

Are you using the sonatype/nexus3 image? Then it should be in /nexus-data.

If it's not there, then the only solution I've found was to remove all the contents of the /nexus-data directory and restart the container. That should initialize a new config, including a new admin password, which should now be available at /nexus-data/admin.password.

Selfregulated answered 12/1, 2021 at 19:23 Comment(0)
S
5

Make docker container using following command

$ docker volume create --name nexus-data
$ docker run -d -p 8081:8081 --name nexus -v nexus-data:/nexus-data sonatype/nexus3

Then you will find admin.password file in /nexus-data folder. Run following command to see default password!

$ docker exec -it nexus /bin/bash
bash-4.4$ cat /nexus-data/admin.password

For more detailed comment, check following url

https://hub.docker.com/r/sonatype/nexus3/#user-content-persistent-data

Sneakers answered 14/3, 2022 at 7:55 Comment(0)
S
3

Are you using the sonatype/nexus3 image? Then it should be in /nexus-data.

If it's not there, then the only solution I've found was to remove all the contents of the /nexus-data directory and restart the container. That should initialize a new config, including a new admin password, which should now be available at /nexus-data/admin.password.

Selfregulated answered 12/1, 2021 at 19:23 Comment(0)
G
1

Try this command to locate the file:

$ find / -name admin.password

it will show you the path.

Output in my setup:

/mnt/data/admin.password
Giltzow answered 27/10, 2023 at 16:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.