Skip to content

Commit 4d4fb9c

Browse files
Prachi Damlechiradeep
authored andcommitted
https://issues.apache.org/jira/browse/CLOUDSTACK-993
Changes: - Introduction of maven skipped the java code that inserts the admin user. This causes the NPE in management server while trying to find the user and also, admin user cannot login as expected. - Fixing the insertion of the admin user as part of startup.
1 parent cadca5f commit 4d4fb9c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎server/src/com/cloud/server/ConfigurationServerImpl.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,8 @@ protected void saveUser() {
341341
}
342342

343343
// now insert the user
344-
insertSql = "INSERT INTO `cloud`.`user` (id, uuid, username, account_id, firstname, lastname, created, state) " +
345-
"VALUES (" + id + ", UUID(), '" + username + "', 2, '" + firstname + "','" + lastname + "',now(), 'disabled')";
344+
insertSql = "INSERT INTO `cloud`.`user` (id, username, password, account_id, firstname, lastname, created, state) " +
345+
"VALUES (" + id + ",'" + username + "', RAND(), 2, '" + firstname + "','" + lastname + "',now(), 'disabled')";
346346

347347
txn = Transaction.currentTxn();
348348
try {

0 commit comments

Comments
 (0)