Hi,

I'm working on using a script to change the password for a given principal.
The resulting command line is something like this:

kadmin -k -t keytapfile -p host/host.foobar -q "cpw -pw princ@REALM"

When contains a quote character (i.e. password is: foobar"omg)
I get the following error:

kadmin: Unbalanced quotes in command line

Note that the quote is escaped:
kadmin -k -t keytapfile -p host/host.foobar -q "cpw -pw foobar\"omg princ@REALM"



I tried using kadmin without '-q' and got the same error message when using
the command directly:

# kadmin -k -t keytapfile -p host/host.foobar
kadmin: cpw -pw foobar"omg princ@REALM
kadmin: Unbalanced quotes in command line

Samething when escaped:

kadmin: cpw -pw foobar\"omg princ@REALM
kadmin: Unbalanced quotes in command line



Only succesful way I found to set a password using a quote (not escaped) was:

# kadmin -k -t keytapfile -p host/host.foobar
kadmin: cpw princ@REALM
Enter password for principal "princ@REALM":
Re-enter password for principal "princ@REALM":
Password for "princ@REALM" changed.


I'm using krb5-1.5.3.


Any ideas or alternative approaches?



Thanks!

--
Klaus

"Oops, I always forget the purpose of competition is to divide people into
winners and losers." -Hobbes being sarcastic