当前位置:网站首页>Enable SASL authentication for memcached
Enable SASL authentication for memcached
2022-07-03 12:38:00 【Brother Xing plays with the clouds】
MemCached from 1.4.3 Version start , Can support SASL authentication . It is more suitable for multiple applications to share one MemCached colony , It needs to be done at compile time , add –enable-sasl Options .
start-up memcached when , increase -S The option to
“ ./configure –prefix=%{datadir} –enable-sasl
/usr/local/bin/memcached -S -d -u nobody ” SASL Authentication can also have many authentication mechanisms , such as pam,shadow,ldap etc.
The following is configured to use shadow How to authenticate
“ # modify /etc/sysconfig/saslauthd file
MECH=shadow
# Set the user's SASL The authentication code
saslpasswd2 -c -a memcached memuser
# Finally generated DB The file in /etc/ Next
-rw-r—– 1 root root 12288 Mar 6 11:52 /etc/sasldb2
# You can view the current SASL user
sasldblistusers2 ”
The following is configured to pass pam-mysql Use mysql Database to authenticate
“ # First installation pam-mysql
wget "http://prdownloads.sourceforge.net/pam-mysql/pam_mysql-0.7RC1.tar.gz"
./configure –with-mysql=/opt/apps_install/mysql-5.5.17
make & make install
# Add a soft link
ln -s /lib/security/pam_mysql.so /lib64/security/pam_mysql.so
# modify saslauthd To configure
MECH=pam
# edit pam.d Of memcached To configure
auth sufficient pam_mysql.so user=sasl passwd=saslpwd host=xxx db=dbname table=t_app_info usercolumn=appid passwdcolumn=secret crypt=0 sqllog=1 verbose=1
account required pam_mysql.so user=sasl passwd=saslpwd host=xxx db=dbname table=t_app_info usercolumn=appid passwdcolumn=secret crypt=0 sqllog=1 verbose=1
# New addition memcached Configuration file for /etc/sasl2/memcached.conf
pwcheck_method: saslauthd
# restart saslauthd
/etc/init.d/saslauthd restart
# test saslauthd Certification has been successful
/usr/sbin/testsaslauthd -s /etc/pam.d/memcached -u 10000 -p pwd
0: OK "Success." ”
memcached Of java client, Such as spymemcached and xmemcached They have already supported it SASL Certified
“ #xmemcached Certification examples
MemcachedClientBuilder builder = new XMemcachedClientBuilder(AddrUtil.getAddresses("10.x.xx.xx:11211"));
builder.addAuthInfo(AddrUtil.getOneAddress("10.x.xx.xx:11211"), AuthInfo.plain("10000", "pwd"));
builder.setCommandFactory(new BinaryCommandFactory());
client=builder.build();
String v = client.get("test2"); ” python Version of pylibmc Also support SASL authentication
边栏推荐
- Cloud Computing future - native Cloud
- alright alright alright
- Sword finger offer07 Rebuild binary tree
- It feels great to know you learned something, isn‘t it?
- DEJA_ Vu3d - cesium feature set 053 underground mode effect
- Recovery of website address and method of Amazon account login two-step verification failure caused by mobile phone number becoming empty
- Swift return type is a function of function
- 2020-10_ Development experience set
- 剑指Offer04. 二维数组中的查找【中等】
- Bert running error: attributeerror: module'tensorflow contrib. tpu' has no attribute 'InputPipelineConfig'
猜你喜欢

Itext7 uses iexternalsignature container for signature and signature verification

2.8 overview of ViewModel knowledge
![Sword finger offer04 Search in two-dimensional array [medium]](/img/c4/002c951f8d914aaea4f4133685ebd1.png)
Sword finger offer04 Search in two-dimensional array [medium]

Prompt unread messages and quantity before opening chat group
![[download attached] password acquisition tool lazagne installation and use](/img/21/eccf87ad9946d4177b600d96e17322.png)
[download attached] password acquisition tool lazagne installation and use

Sword finger offer05 Replace spaces

Summary of error prone knowledge points: Calculation of define s (x) 3*x*x+1.

If you can't learn, you have to learn. Jetpack compose writes an im app (I)

Summary of development issues

阿里大于发送短信(用户微服务--消息微服务)
随机推荐
Eureka self protection
Do you feel like you've learned something and forgotten it?
Togaf certification self-study classic v2.0
剑指Offer09. 用两个栈实现队列
Use bloc to build a page instance of shutter
Dart: view the dill compiled code file
【ManageEngine】IP地址扫描的作用
Flutter Widget : Flow
elastic_ L01_ summary
Unicode查询的官方网站
Atomic atomic operation
Kung Fu pays off, and learning is done
阿里大于发送短信(用户微服务--消息微服务)
Sword finger offer04 Search in two-dimensional array [medium]
[embedded] - Introduction to four memory areas
Flutter: self study system
Adult adult adult
Sword finger offer09 Implementing queues with two stacks
JVM memory model
New features of ES6