
改变目录属性:hadoop fs -chown test:hdfs /test

使用test用户登录

修改密码和重新生成
#修改密码命令cpw test(KDC server上执行) # kadmin.local Authenticating as principal test/admin@CESHI.COM with password. kadmin.local: cpw test Enter password for principal "test1@CESHI.COM": ceshi123 Re-enter password for principal "test1@CESHI.COM": ceshi123 change_password: Principal does not exist while changing password for "test@CESHI.COM". kadmin.local: exit
生成新的多用户使用keytab文件
创建keytab文件(生成到当前文件夹下)
案例:将hive和hdfs的keytab集成到同一个keytab文件中
1.查看所有princs
# kadmin.local Kadmin.local: listprincs hbase/hdp143@CESHI.COM" hdfs-vrvtest@CESHI.COM" hive/hdp140@CESHI.COM"
2.添加hdfs的princs的keytab到hdfs-hive.keytab
# kadmin.local Kadmin.local: xst -norandkey -k hdfs-hive.keytab hdfs-vrvtest@CESHI.COM

3.添加hive的princs的keytab到hdfs-hive.keytab
# kadmin.local Kadmin.local: xst -norandkey -k hdfs-hive.keytab hive/hdp140@CESHI.COM
查看生成的hdfs-hive.keytab


使用生成的Keytab文件登录
# kinit -k -t hdfs-hive.keytab hive/hdp140@CESHI.COM

修改租期
1.修改全局租期
# vi /etc/krb5.conf [libdefaults] default_realm = CESHI.COM dns_lookup_realm = false dns_lookup_kdc = false ticket_lifetime = 24h #ticket 租期时间 renew_lifetime = 7d #重新申请时间 forwardable = true
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-66746-6.html
这么没自信还顾水军