2016-04-04 8 views
0

私は2台のサーバをredisで稼動させています.1台はVMの中で私のもとに届けられました。古いUbuntu(12.04)のredis 2.2.12、私はredis 2.8 .19、centos 7.私はredis-cliに行くと、とcentosサーバーで失敗するredisとdjangoアプリを持って、私はAUTH <anything>それはOKですが、私に応答するが、 ubuntuサーバーで、ランダムなパスワードで同じことをすると、OKと表示されます。これはどのように可能ですか?Redis AUTH with random password

いずれのサーバーも、redis.confファイルの認証用に構成されていません。

答えて

0

redis.confから:だから

# Require clients to issue AUTH <PASSWORD> before processing any other 
# commands. This might be useful in environments in which you do not trust 
# others with access to the host running redis-server. 
# 
# This should stay commented out for backward compatibility and because most 
# people do not need auth (e.g. they run their own servers). 
# 
# Warning: since Redis is pretty fast an outside user can try up to 
# 150k passwords per second against a good box. This means that you should 
# use a very strong password otherwise it will be very easy to break. 
# 
# requirepass foobared 

あなたがrequirepassを設定しない限り、Redisのは、認証なしで任意のコマンドを受け付けます。

+0

私はそれを知っています。しかし、両方のサーバはrequirepassに関して同じ設定をしています(つまり、どちらも有効ではありません)。そして、UbuntuではOKレスポンスで 'AUTH randompassword'コマンドを使用することができ、CentOSは同じことをしようとするとエラーになります。 – crscardellino

+0

そうです。私はシステムを再起動する。サーバを停止し、設定を変更する(パスワードを追加するなど) – crscardellino

+0

次に設定するファイルは正しい設定ファイルで、私はubuntuを使い、設定は '/ etc/redis/6379.conf'にあります。あなたはそれをどのようにインストールしましたか? – ahmed