GrepBoard/Manuals
605 manuals ·

Fix Redis NOAUTH Authentication required and WRONGPASS

·Tested on Redis 7.4.12 (Docker redis:7) · 2026-10·Test scope ↓·6 steps

Redis NOAUTH Authentication required means a password-protected server got a command before AUTH. Tell requirepass from ACL users and send the right AUTH.

output
NOAUTH Authentication required.

The server has a password and this connection has not run AUTH yet. Every command, PING included, gets this reply. Give the client the password (and the user name if ACL users are in use) and it clears. If you sent a password and get WRONGPASS, the value or the user name is wrong.

output
WRONGPASS invalid username-password pair or user is disabled.

[1] Find out how the password is set. Since Redis 6, requirepass is the old way of setting the password of the default user, while ACLs give each user its own password and permissions (ACL). Log in with the admin password and list the users:

console
$ REDISCLI_AUTH='<password>' redis-cli ACL LISTuser app on sanitize-payload #7b367d80a165…8440e ~app:* resetchannels -@all +@read +@writeuser default on sanitize-payload #8c889b8b40e7…24fd56 ~* &* +@all

#… is the SHA-256 hash of a password. A hash on default means requirepass is set; another user such as app means you must check which user the app is supposed to log in as. A server with no auth configured shows user default on nopass ~* &* +@all.

[2] On a requirepass server, send just the password. One-argument AUTH <password> authenticates as default.

console
$ printf "AUTH <password>\nPING\n" | redis-cliOKPONG

redis-cli -a works too, but warns that the password sits on the command line. The REDISCLI_AUTH environment variable gives the same result without the warning.

console
$ redis-cli -a '<password>' pingWarning: Using a password with '-a' or '-u' option on the command line interface may not be safe.PONG$ REDISCLI_AUTH='<password>' redis-cli pingPONG

[3] For an ACL user, always send the user name too. With only the user's password, Redis checks it against default, so even the right password gets WRONGPASS. This is the most common mistake.

console
$ printf "AUTH <app password>\n" | redis-cliWRONGPASS invalid username-password pair or user is disabled.$ redis-cli --user app --pass '<app password>' --no-auth-warning SET app:2 yOK$ redis-cli -u 'redis://app:<app password>@127.0.0.1:6379' --no-auth-warning GET app:2y

In app config, use a connection string redis://<user>:<password>@<host>:6379 or the client's username setting. User names are case sensitive.

[4] If the password is right and you still get WRONGPASS, check whether the user is disabled — the or user is disabled part of the message. ACL LIST shows off instead of on.

console
$ redis-cli --user app --pass '<app password>' --no-auth-warning pingAUTH failed: WRONGPASS invalid username-password pair or user is disabled.NOAUTH Authentication required.

redis-cli sends the command even after a failed auth, hence the extra NOAUTH line. Per the docs, switching a user off does not affect connections that already authenticated, so "old app servers work, the freshly started one fails" points here.

[5] ACL LOG shows who failed and from where, more precisely than app logs:

console
$ REDISCLI_AUTH='<password>' redis-cli ACL LOG 2count1reasonauthcontexttoplevelobjectAUTHusernameappage-seconds0.071client-infoid=19 addr=127.0.0.1:56526 laddr=127.0.0.1:6379 fd=12 name= age=0 idle=0 flags=N db=0 … cmd=auth user=default redir=-1 resp=2 lib-name= lib-ver=…

reason auth is a failed login; command means the login worked but a command was refused for lack of permission. Permission refusals come back as NOPERM:

console
$ printf "AUTH app <app password>\nACL WHOAMI\nSET app:1 x\nSET other:1 x\nCONFIG GET maxmemory\n" | redis-cliOKNOPERM User app has no permissions to run the 'acl|whoami' command OKNOPERM No permissions to access a key NOPERM User app has no permissions to run the 'config|get' command 

NOPERM is not an auth problem: the key is outside the user's pattern (~app:*) or the command outside its categories. Fix the ACL SETUSER rules.

[6] When changing a password, new connections need the new value at once. In the test, a new connection with the old password got WRONGPASS right after CONFIG SET requirepass. If the app cannot switch first, give the ACL user a second password (ACL SETUSER app '><new password>') so both work, move the app, then remove the old one (ACL SETUSER app '<<old password>').

console
$ redis-cli --no-auth-warning -a '<new password>' CONFIG REWRITEERR The server is running without a config file

CONFIG SET and ACL SETUSER are lost on restart. With a config file, save them with CONFIG REWRITE (or ACL SAVE with an ACL file); without one, as above, put the values in the startup options or a config file yourself. The docs recommend long passwords generated with ACL GENPASS.

#redis#noauth#wrongpass#requirepass#acl