add kerberos config
This commit is contained in:
parent
45ba21dbc0
commit
a8b9effd45
4
.gitignore
vendored
4
.gitignore
vendored
@ -176,5 +176,5 @@ cython_debug/
|
||||
a.out
|
||||
*.out
|
||||
*.o
|
||||
server
|
||||
client
|
||||
sample/sample_server
|
||||
sample/sample_client
|
||||
|
BIN
client/cli.keytab
Normal file
BIN
client/cli.keytab
Normal file
Binary file not shown.
4
client/env
Executable file
4
client/env
Executable file
@ -0,0 +1,4 @@
|
||||
PWD=$(pwd)
|
||||
KRB5_CONFIG=${PWD}/client/krb5.conf
|
||||
KRB5CCNAME=FILE:/tmp/krb5cc_cli_%{uid}
|
||||
KRB5_CCNAME=FILE:/tmp/krb5cc_cli_%{uid}
|
20
client/krb5.conf
Executable file
20
client/krb5.conf
Executable file
@ -0,0 +1,20 @@
|
||||
[logging]
|
||||
default = FILE:/var/log/krb5libs.log
|
||||
kdc = FILE:/var/log/krb5kdc.log
|
||||
admin_server = FILE:/var/log/kadmind.log
|
||||
|
||||
[libdefaults]
|
||||
default_realm = TEST.COM
|
||||
default_ccache_name = FILE:/tmp/krb5cc_cli_%{uid}
|
||||
dns_lookup_realm = false
|
||||
dns_lookup_kdc = false
|
||||
ticket_lifetime = 24h
|
||||
renew_lifetime = 7d
|
||||
forwardable = true
|
||||
|
||||
[realms]
|
||||
TEST.COM = {
|
||||
kdc = krb5-kdc-server:88
|
||||
admin_server = krb5-kdc-server
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
CC=gcc
|
||||
|
||||
PROGRAM=client server
|
||||
PROGRAM=sample_client sample_server
|
||||
|
||||
LIBSSL_LIBS=-lsasl2
|
||||
|
||||
@ -14,17 +14,17 @@ all: $(PROGRAM)
|
||||
@echo "build seccess!"
|
||||
@echo ""
|
||||
|
||||
client:sample-client.c
|
||||
sample_client:sample-client.c
|
||||
$(CC) -g -c sample-client.c $(FINAL_FLAG)
|
||||
$(CC) -g -o client sample-client.o $(FINAL_FLAG)
|
||||
$(CC) -g -o sample_client sample-client.o $(FINAL_FLAG)
|
||||
rm *.o
|
||||
|
||||
server:sample-server.c
|
||||
sample_server:sample-server.c
|
||||
$(CC) -g -c sample-server.c $(FINAL_FLAG)
|
||||
$(CC) -g -o server sample-server.o $(FINAL_FLAG)
|
||||
$(CC) -g -o sample_server sample-server.o $(FINAL_FLAG)
|
||||
rm *.o
|
||||
|
||||
clean:
|
||||
rm server client
|
||||
rm sample_server sample_client
|
||||
|
||||
|
||||
|
3
server/env
Executable file
3
server/env
Executable file
@ -0,0 +1,3 @@
|
||||
PWD=$(pwd)
|
||||
export KRB5_CONFIG=${PWD}/server/krb5.conf
|
||||
export KRB5CCNAME=/tmp/krb5cc_hadoop_1000
|
BIN
server/hadoop.keytab
Normal file
BIN
server/hadoop.keytab
Normal file
Binary file not shown.
20
server/krb5.conf
Executable file
20
server/krb5.conf
Executable file
@ -0,0 +1,20 @@
|
||||
[logging]
|
||||
default = FILE:/var/log/krb5libs.log
|
||||
kdc = FILE:/var/log/krb5kdc.log
|
||||
admin_server = FILE:/var/log/kadmind.log
|
||||
|
||||
[libdefaults]
|
||||
default_realm = TEST.COM
|
||||
default_ccache_name = FILE:/tmp/krb5cc_hadoop_%{uid}
|
||||
dns_lookup_realm = false
|
||||
dns_lookup_kdc = false
|
||||
ticket_lifetime = 24h
|
||||
renew_lifetime = 7d
|
||||
forwardable = true
|
||||
|
||||
[realms]
|
||||
TEST.COM = {
|
||||
kdc = krb5-kdc-server:88
|
||||
admin_server = krb5-kdc-server
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user