* @throws CommandException
*/
protected void createMasterPasswordFile() throws CommandException {
final File pwdFile = new File(this.getServerDirs().getAgentDir(), MASTER_PASSWORD_ALIAS);
try {
PasswordAdapter p = new PasswordAdapter(pwdFile.getAbsolutePath(),
MASTER_PASSWORD_ALIAS.toCharArray());
p.setPasswordForAlias(MASTER_PASSWORD_ALIAS, newPassword.getBytes());
pwdFile.setReadable(true);
pwdFile.setWritable(true);
} catch (Exception ex) {
throw new CommandException(strings.get("masterPasswordFileNotCreated", pwdFile),
ex);