Create user/password Redis V5

huangapple go评论47阅读模式
英文:

Create user/password Redis V5

问题

I need to create a new user on REDIS V5 and assign a password.
This is for application connect.

I only have the requirepass on redis.conf. But this password is only for me and i don't share it.

I don't have ACL.

Thanks Regards. Hernán.

I'm expecting a new user for the applications connect.

英文:

I need to create a new user on REDIS V5 and assign a password.
This is for application connect.

I only have the requirepass on redis.conf. But this password is only for me and i don't share it.

I don't have ACL.

Thanks
Regards.
Hernán.

I'm expecting a new user for the applications connect

答案1

得分: 1

以下是翻译好的部分:

"Since you have not provided with what access you want the user to be created, here is a sample command that will create a user 'myuser' with a password of 'mypassword' which will have access to all commands except the commands that are tagged as 'dangerous':

acl setuser myuser on >mypassword +@all -@dangerous ~*

When you run this command in redis-cli, this user gets created and it's information is stored in memory, so you will want to persist this data in a file so that it doesn't get lost when redis is restarted. You can do so by running:

ACL SAVE"

英文:

Since you have not provided with what access you want the user to be created, here is a sample command that will create a user "myuser" with a password of "mypassword" which will have access to all commands except the commands that are tagged as "dangerous"

acl setuser myuser on >mypassword +@all -@dangerous ~*

When you run this command in redis-cli, this user gets created and it's information is stored in memory, so you will want to persist this data in a file so that it doesn't get lost when redis is restarted. You can do so by running:

ACL SAVE

huangapple
  • 本文由 发表于 2023年4月17日 22:45:02
  • 转载请务必保留本文链接:https://go.coder-hub.com/76036397.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定