Reset Admin Password in Sonatype Nexus Repository 3

Lost Your Admin Password? Reset It in Sonatype Nexus Repository 3

Reset Admin Password

1.SSH to Nexus Server

2.Enter the following command

java -jar $NEXUS_HOME/lib/support/nexus-orient-console.jar

3.Stop Nexus service, and backup your Nexus Data Directory/db

systemctl stop nexus.service

4.Run the following command

connect plocal:./sonatype-work/nexus3/db/security admin admin

5.After the connect command succeeds, check that the admin user exists

select * from user where id = "admin"

6.Issue this command in the console to update the admin user password to admin123

update user SET password="$shiro1$SHA-512$1024$NE+wqQq/TmjZMvfI7ENh/g==$V4yPw8T64UQ6GfJfxYq2hLsVrBY8D1v+bktfOxGdt4b/9BthpWPNUy/CBk6V9iA0nHpzYzJFWO8v/tZFtES8CA==" UPSERT WHERE id="admin"

7.Start Nexus and login with new password

Updated on