Kerberos kinit enter password without prompt

前端 未结 5 494
盖世英雄少女心
盖世英雄少女心 2020-12-05 13:07

I was looking at this: http://docs.oracle.com/javase/7/docs/technotes/tools/windows/kinit.html and noticed that it says I could use the \"password flag\". I am not sure how

5条回答
  •  一生所求
    2020-12-05 13:38

    Create a keytab using "ktutil"

    > ktutil   
    ktutil:  addent -password -p username@domain.com -k 1 -e rc4-hmac   
    Password for username@domain.com: [enter your password]  
    ktutil:  addent -password -p username@domain.com -k 1 -e aes256-cts  
    Password for username@domain.com: [enter your password]   
    ktutil:  wkt username.keytab   
    ktutil:  quit
    
    
        # Below steps will will create a keytab for the user, move it into a secure directory, 
    and automatically get a ticket when the user logs in with a bash shell
    
    mkdir /home/username/keytabs 
    chmod 700 /home/username/keytabs 
    mv username.keytab /home/username/keytabs 
    chmod 600 /home/username/keytabs/username.keytab 
    echo "kinit -kt /home/username/keytabs/username.keytab username@domain.com" >> /home/username/.bash_profile
    

    Command to pass keytab and login

    kinit username@domain.com -k -t /path/to/username.keytab

    Reference link hortonworks kb.iu.edu

提交回复
热议问题