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 -
enjoy
import os, getpass
from subprocess import run, PIPE
import sys
userndomain, passwd, enctype = 'username@DOMAIN', 'secret', 'arcfour-hmac-md5'
input_load = f"""add_entry -password -p {userndomain} -k 1 -e {enctype}
{passwd}
write_kt {user}.keytab
quit
"""
p = run(['ktutil'], stdout=PIPE, input=input_load, encoding='ascii')