File ca-user.sh of Package libest
#!/bin/bash # # Reference: # https://github.com/cisco/libest/tree/main/example/server # if [ "${UID}" != "0" ]; then sudo ${0} ${@} exit $? fi if [ "${1}" == "add" ]; then touch /etc/est/server/passwd.srpv openssl srp -srpvfile /etc/est/server/passwd.srpv -gn 1536 -add "${2}" else echo "Use: ${0} add username" exit -1 fi