<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:05:20 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-4225] Adding first admin user to database via localhost works but returns error message</title>
                <link>https://jira.mongodb.org/browse/SERVER-4225</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;2.1 make getLastError require auth, which it didn&apos;t in 2.0 and earlier.&lt;/p&gt;

&lt;p&gt;&amp;gt; mkdir tempdb&lt;br/&gt;
&amp;gt; mongod --auth --dbpath tempdb/&lt;/p&gt;



&lt;p&gt;&amp;gt; mongo&lt;br/&gt;
MongoDB shell version: 2.0.1&lt;br/&gt;
connecting to: test&lt;br/&gt;
test&lt;span class=&quot;error&quot;&gt;&amp;#91;19:11:40&amp;#93;&lt;/span&gt;&amp;gt; use admin&lt;br/&gt;
switched to db admin&lt;br/&gt;
admin&lt;span class=&quot;error&quot;&gt;&amp;#91;19:11:42&amp;#93;&lt;/span&gt;&amp;gt; db.addUser(&quot;admin&quot;,&quot;password&quot;)&lt;br/&gt;
Mon Nov  7 19:11:52 uncaught exception: getlasterror failed: &lt;/p&gt;
{ &quot;errmsg&quot; : &quot;need to login&quot;, &quot;ok&quot; : 0 }
&lt;p&gt;admin&lt;span class=&quot;error&quot;&gt;&amp;#91;19:11:52&amp;#93;&lt;/span&gt;&amp;gt; db.auth(&apos;admin&apos;,&apos;password&apos;)&lt;br/&gt;
1&lt;br/&gt;
admin&lt;span class=&quot;error&quot;&gt;&amp;#91;19:11:58&amp;#93;&lt;/span&gt;&amp;gt; db.system.users.find()&lt;/p&gt;
{ &quot;_id&quot; : ObjectId(&quot;4eb873c7cdae97d7a7bee931&quot;), &quot;user&quot; : &quot;admin&quot;, &quot;readOnly&quot; : false, &quot;pwd&quot; : &quot;90f500568434c37b61c8c1ce05fdf3ae&quot; }</description>
                <environment></environment>
        <key id="24618">SERVER-4225</key>
            <summary>Adding first admin user to database via localhost works but returns error message</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="spencer@mongodb.com">Spencer Brody</assignee>
                                    <reporter username="spencer@mongodb.com">Spencer Brody</reporter>
                        <labels>
                    </labels>
                <created>Tue, 8 Nov 2011 00:25:15 +0000</created>
                <updated>Mon, 11 Jul 2016 18:34:52 +0000</updated>
                            <resolved>Mon, 9 Jul 2012 21:15:36 +0000</resolved>
                                    <version>2.1.2</version>
                                    <fixVersion>2.2.0-rc0</fixVersion>
                                    <component>Security</component>
                    <component>Shell</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="141045" author="spencer" created="Mon, 9 Jul 2012 21:15:36 +0000"  >&lt;p&gt;Fixed for the shell, but may require additional changes in the drivers.&lt;/p&gt;</comment>
                            <comment id="139364" author="auto" created="Tue, 3 Jul 2012 21:55:00 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-07-03T14:57:19-07:00&apos;, u&apos;email&apos;: u&apos;eliot@10gen.com&apos;, u&apos;name&apos;: u&apos;Eliot Horowitz&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-4225&quot; title=&quot;Adding first admin user to database via localhost works but returns error message&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-4225&quot;&gt;&lt;del&gt;SERVER-4225&lt;/del&gt;&lt;/a&gt; - when creating first user, we can&apos;t call getLastError&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/dfd39b495e3bd5ab6ee7f35edaeb8f17129e7783&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/dfd39b495e3bd5ab6ee7f35edaeb8f17129e7783&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="137788" author="spencer" created="Thu, 28 Jun 2012 23:58:32 +0000"  >&lt;p&gt;Also, I can no longer reproduce this on 2.0.2.  I&apos;m starting to think that was a typo and I meant 2.1.x?&lt;/p&gt;</comment>
                            <comment id="137787" author="spencer" created="Thu, 28 Jun 2012 23:55:16 +0000"  >&lt;p&gt;This is a problem for more than just the shell.  Most drivers call GLE in their addUser method to make sure the user was added successfully.  This will make those calls return an exception, even when they succeeded, for adding the first user over localhost.&lt;/p&gt;</comment>
                            <comment id="137785" author="spencer" created="Thu, 28 Jun 2012 23:51:13 +0000"  >&lt;p&gt;The problem is that if there&apos;s no admin users and you&apos;re connected over localhost, you&apos;re given full access and can insert into system.users to create the first user.  When you try to call getLastError to check if the user was created successfully, however, the command is denied because there is now a user in existence and you&apos;re still unauthenticated.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="42806">SERVER-6246</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="41410">SERVER-6101</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="50537">PYTHON-407</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 29 Jun 2012 00:25:03 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        11 years, 32 weeks, 2 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/SERVER-6246'>SERVER-6246</a></s>]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            11 years, 32 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>spencer@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hroman:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrgdqf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9134</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht080v:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>