[38073] in Kerberos
powershell calling cpw - white space in password problem
daemon@ATHENA.MIT.EDU (Ramaiah, Vanna G.)
Wed Oct 11 17:37:21 2017
From: "Ramaiah, Vanna G." <ramaiah@musc.edu>
To: "kerberos@mit.edu" <kerberos@mit.edu>
Date: Wed, 11 Oct 2017 21:36:59 +0000
Message-ID: <AE3FEB1BD25D22479E9F293EBBF869B9017FC6C0FE@exg-mb10b.clinlan.local>
Content-Language: en-US
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: kerberos-bounces@mit.edu
I have a non-interactive powershell that changes password using cpw. It works fine. When the password contain white space character in it, it fails because it sees white space as delimiter.
The following command works fine. The part -q is in single quotes. If there is a space in UserPassword it fails. How to overcome this problem?
$processStartInfo.Arguments ="" + $server + " -l " + $AdminUserName + " -pw " + $AdminPassword + " -v " +" /usr/bin/kadmin -p " + $AdminUserName + "/admin -w " + $AdminPassword + " -q 'cpw -pw " + $NewUserPassword + " " + $PrincipalName +"'"
$processStartInfo.Arguments = ServerName -l AdminAccount -pw AdminPassword -v /usr/bin/kadmin -p AdminAccount/admin -w AdminPassword -q 'cpw -pw UserPassword UserAccount'
-------------------------------------------------------------------------
This message was secured via TLS by MUSC.
________________________________________________
Kerberos mailing list Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos