[30081] in Kerberos

home help back first fref pref prev next nref lref last post

kadmin: Unbalanced quotes in command line

daemon@ATHENA.MIT.EDU (Klaus Jensen)
Tue Jul 8 17:20:16 2008

Date: Tue, 8 Jul 2008 16:53:00 +0200
From: Klaus Jensen <kjensen@diku.dk>
To: kerberos@mit.edu
Message-ID: <20080708145300.GB22948@diku.dk>
MIME-Version: 1.0
Content-Disposition: inline
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: kerberos-bounces@mit.edu

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 <somepassword> princ@REALM"

When <somepassword> 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
________________________________________________
Kerberos mailing list           Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos

home help back first fref pref prev next nref lref last post