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

Reply via email to