[38074] in Kerberos
RE: powershell calling cpw - white space in password problem
daemon@ATHENA.MIT.EDU (Ramaiah, Vanna G.)
Wed Oct 11 17:51:43 2017
From: "Ramaiah, Vanna G." <ramaiah@musc.edu>
To: "kerberos@mit.edu" <kerberos@mit.edu>
Date: Wed, 11 Oct 2017 21:51:27 +0000
Message-ID: <AE3FEB1BD25D22479E9F293EBBF869B9017FC6C17B@exg-mb10b.clinlan.local>
In-Reply-To: <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
The following 2 works fine.
ServerName -l AdminAccount -pw AdminPassword -v /usr/bin/kadmin -p AdminAccount/admin -w AdminPassword -q 'cpw -pw UserPassword UserAccount'
ServerName -l AdminAccount -pw AdminPassword -v /usr/bin/kadmin -p AdminAccount/admin -w AdminPassword -q 'cpw -pw "UserPassword" UserAccount'
The following does work.
ServerName -l AdminAccount -pw AdminPassword -v /usr/bin/kadmin -p AdminAccount/admin -w AdminPassword -q 'cpw -pw "User Password" UserAccount'
-----Original Message-----
From: kerberos-bounces@mit.edu [mailto:kerberos-bounces@mit.edu] On Behalf Of Ramaiah, Vanna G.
Sent: Wednesday, October 11, 2017 5:37 PM
To: kerberos@mit.edu
Subject: powershell calling cpw - white space in password problem
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<mailto:Kerberos@mit.edu>
https://mailman.mit.edu/mailman/listinfo/kerberos
-------------------------------------------------------------------------
This message was secured via TLS by MUSC.
________________________________________________
Kerberos mailing list Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos