Skip Menu |
 

From: "Дилян Палаузов" <dilyan.palauzov@aegee.org>
Date: Thu, 28 Nov 2019 14:47:36 +0000
Subject: cpw -pw <space-in-the-password> user
To: "krb5-bugs" <krb5-bugs@mit.edu>
Hello,

with kadmin.local I want to change the password using cpw -pw. This seems impossible when the password contains space
as I do not find way to escape the space. In particular

cpw -pw A\ B user
cpw -pw A B user
cpw -pw 'A B' user

is not accepted.

Kind regards
Dilyan Palauzov
Within a kadmin.local prompt, the only way to include spaces in an argument is to use a double-quoted string: cpw -pw "space in the password" user

Double quotes can be included in such a password by repeating them: cpw -pw "spaces and ""quotes"" in the password" user

Starting with release 1.14, you can also specify a command on the kadmin.local command line, and let the shell separate arguments: kadmin.local cpw -pw 'space in the password' user

The kadmin man page doesn't appear to document quoted arguments (other than the command-line option I mentioned last), so I'll leave this ticket open and change its subject to indicate that the documentation should be amended.

ktutil uses the same library as kadmin to handle argument parsing, and also needs its man page amended.