I can confirm that either one works as well. I have noticed that
sometimes if I try to log in right as the mgmt server is coming up, it
will reject my credentials, and then 5 seconds later when it's
finished initializing, it works.  We should really delay the login/UI
to be the last thing that comes up.

Thanks for troubleshooting. In light of this, let's leave the patch out.

On Thu, Aug 29, 2013 at 10:03 AM, Jonathan Creasy
<jonathan.cre...@contegix.com> wrote:
> Our database has "admin" for the user. I can login as "Admin" or "admin" on a 
> freshly minted system.
>
> I am not sure what problem I faced originally that led me to think that I had 
> to use "Admin" in order to login.
>
> -Jonathan
>
> ----- Original Message -----
> From: "Marcus Sorensen" <shadow...@gmail.com>
> To: "Jonathan Creasy" <jonat...@ghostlab.net>
> Cc: "Radhika Puthiyetath" <radhika.puthiyet...@citrix.com>, 
> dev@cloudstack.apache.org
> Sent: Thursday, August 29, 2013 12:14:23 AM
> Subject: Re: Review Request 13610: Bugfix CLOUDSTACK-4359: Default username 
> is Admin not admin
>
> Here's where the admin account is created
> (server/src/com/cloud/server/ConfigurationServerImpl.java), when
> management server is first started after fresh db deploy. Looks like
> we intend for it to be "admin", I'm not sure where the "Admin" might
> be coming from unless it's a deployment on top of an existing
> database, or there's a second user "Admin" in addition to the id=2
> "admin" user, or it's some sort of developer setting for a test build.
>
>         // insert admin user, but leave the account disabled until we set a
>         // password with the user authenticator
>         long id = 2;
>         String username = "admin";
>         String firstname = "admin";
>         String lastname = "cloud";
>
>         // create an account for the admin user first
>         insertSql = "INSERT INTO `cloud`.`account` (id, uuid,
> account_name, type, domain_id, account.default) VALUES (" + id + ",
> UUID(), '" + username + "', '1', '1', 1)";
>         txn = Transaction.currentTxn();
>         try {
>             PreparedStatement stmt = txn.prepareAutoCloseStatement(insertSql);
>             stmt.executeUpdate();
>         } catch (SQLException ex) {
>         }
>
>         // now insert the user
>         insertSql = "INSERT INTO `cloud`.`user` (id, uuid, username,
> password, account_id, firstname, lastname, created, state,
> user.default) " +
>                 "VALUES (" + id + ", UUID(), '" + username + "',
> RAND(), 2, '" + firstname + "','" + lastname + "',now(), 'disabled',
> 1)";
>
>
>
> And it seems to work...
>
> [root@devcloud-kvm /]# mysql -e 'drop database cloud'
> [root@devcloud-kvm /]# cloudstack-setup-databases
> cloud:password@localhost --deploy-as root >/dev/null
> [root@devcloud-kvm /]# cloudstack-setup-management
> Starting to configure CloudStack Management Server:
> Configure sudoers ...         [OK]
> Configure Firewall ...        [OK]
> Configure CloudStack Management Server ...[OK]
> CloudStack Management Server setup is Done!
> [root@devcloud-kvm /]# mysql -e 'select username from cloud.user where id=2'
> +----------+
> | username |
> +----------+
> | admin    |
> +----------+
>
> On Wed, Aug 28, 2013 at 10:54 PM, Marcus Sorensen <shadow...@gmail.com> wrote:
>> I'm just wondering what the actual database says... looking into a
>> fresh deploy now. I'm assuming yours was also fresh and not an
>> upgrade?
>>
>> You can run the mysql command 'select username from cloud.user where id=2;'
>>
>> On Wed, Aug 28, 2013 at 10:32 PM, Jonathan Creasy <jonat...@ghostlab.net> 
>> wrote:
>>> Pardon my ignorance, and lack of a computer at hand, what specifically would
>>> you like me to check? I am happy to help track this down.
>>>
>>> -Jonathan
>>>
>>> On Aug 28, 2013 11:14 PM, "Marcus Sorensen" <shadow...@gmail.com> wrote:
>>>>
>>>> Does the actual ROOT/Admin user show that? If so, we should probably fix
>>>> that rather than the doc. No reason to change an established standard now.
>>>>
>>>> On Aug 28, 2013 10:10 PM, "Jonathan Creasy" <jonat...@ghostlab.net> wrote:
>>>>>
>>>>> It's Admin on my boxes, 4.2 branch, CentOS 4.2. Using "admin" doesn't
>>>>> work.
>>>>>
>>>>> I haven't looked at the code to see if it could vary with password
>>>>> hashing methods or something.
>>>>>
>>>>> -Jonathan
>>>>>
>>>>> On Aug 28, 2013 11:08 PM, "Marcus Sorensen" <shadow...@gmail.com> wrote:
>>>>>>
>>>>>> Huh? I've always logged in as 'admin'.
>>>>>>
>>>>>> On Aug 28, 2013 10:01 PM, "Radhika PC" <radhika.puthiyet...@citrix.com>
>>>>>> wrote:
>>>>>>>
>>>>>>>
>>>>>>> -----------------------------------------------------------
>>>>>>> This is an automatically generated e-mail. To reply, visit:
>>>>>>> https://reviews.apache.org/r/13610/#review25706
>>>>>>> -----------------------------------------------------------
>>>>>>>
>>>>>>> Ship it!
>>>>>>>
>>>>>>>
>>>>>>> Ship It!
>>>>>>>
>>>>>>> - Radhika PC
>>>>>>>
>>>>>>>
>>>>>>> On Aug. 16, 2013, midnight, Jonathan Creasy wrote:
>>>>>>> >
>>>>>>> > -----------------------------------------------------------
>>>>>>> > This is an automatically generated e-mail. To reply, visit:
>>>>>>> > https://reviews.apache.org/r/13610/
>>>>>>> > -----------------------------------------------------------
>>>>>>> >
>>>>>>> > (Updated Aug. 16, 2013, midnight)
>>>>>>> >
>>>>>>> >
>>>>>>> > Review request for cloudstack.
>>>>>>> >
>>>>>>> >
>>>>>>> > Bugs: CLOUDSTACK-4359
>>>>>>> >
>>>>>>> >
>>>>>>> > Repository: cloudstack-git
>>>>>>> >
>>>>>>> >
>>>>>>> > Description
>>>>>>> > -------
>>>>>>> >
>>>>>>> > 4.2 documentation lists initial user as admin when it should be Admin
>>>>>>> >
>>>>>>> > /docs/en-US/html/log-in.html
>>>>>>> >
>>>>>>> >
>>>>>>> > Diffs
>>>>>>> > -----
>>>>>>> >
>>>>>>> >   docs/en-US/log-in.xml 84328ce4d45e7a588acb28063616d9c77e5518d8
>>>>>>> >   docs/pot/log-in.pot 2faf14b1738b5f6b7473b35f3b7cf72882c600b2
>>>>>>> >
>>>>>>> > Diff: https://reviews.apache.org/r/13610/diff/
>>>>>>> >
>>>>>>> >
>>>>>>> > Testing
>>>>>>> > -------
>>>>>>> >
>>>>>>> >
>>>>>>> > Thanks,
>>>>>>> >
>>>>>>> > Jonathan Creasy
>>>>>>> >
>>>>>>> >
>>>>>>>
>>>

Reply via email to