Script Kerberos Ktutil to make keytabs

前端 未结 4 788
庸人自扰
庸人自扰 2021-02-03 10:50

I want to make a script that will generate the a keytab using ktutil. When running the script I want to use [user]$ script.sh PASSWORD

#script.sh
echo \"addent -         


        
4条回答
  •  没有蜡笔的小新
    2021-02-03 11:47

    A version in Python

    https://github.com/Tagar/stuff/blob/master/keytab.py

    piping password to ktutil in shell is not secure as password will be visible in list of processes.

    Since this Python scripts just interacts with ktutil using pexpect library, it's possible to implement the same as a pure shell script using expect.

    Hope this helps.

提交回复
热议问题