<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:55:18 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-20793] How Can I drop old system.users collection?</title>
                <link>https://jira.mongodb.org/browse/SERVER-20793</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;How Can I drop system.users collection in database? In previsus versions of MongoDB every database has its own system.users collection but in newer (I think since 2.6) are credentials stored in admin.system.users. I try to drop obsolete collection (somedatabase.system.users), but I can&apos;t.&lt;br/&gt;
I tried it with user with these roles: readWriteAnyDatabase, userAdminAnyDatabase, dbAdminAnyDatabase, clusterAdmin (all on admin database) .&lt;br/&gt;
Error message:&lt;br/&gt;
{{&lt;br/&gt;
rs:PRIMARY&amp;gt; db.system.users.drop()&lt;br/&gt;
2015-09-21T13:55:09.502+0200 drop failed: {&lt;br/&gt;
    &quot;ok&quot; : 0,&lt;br/&gt;
    &quot;errmsg&quot; : &quot;not authorized on somedatabase to execute command &lt;/p&gt;
{ drop: \&quot;system.users\&quot; }
&lt;p&gt;&quot;,&lt;br/&gt;
    &quot;code&quot; : 13&lt;br/&gt;
} at src/mongo/shell/collection.js:598&lt;br/&gt;
}}&lt;/p&gt;</description>
                <environment></environment>
        <key id="233264">SERVER-20793</key>
            <summary>How Can I drop old system.users collection?</summary>
                <type id="6" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14720&amp;avatarType=issuetype">Question</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="-1">Unassigned</assignee>
                                    <reporter username="filip.havlicek@livesport.eu">Filip Havl&#237;?ek</reporter>
                        <labels>
                    </labels>
                <created>Wed, 7 Oct 2015 12:13:26 +0000</created>
                <updated>Sun, 31 Dec 2023 23:33:06 +0000</updated>
                            <resolved>Wed, 7 Oct 2015 13:10:15 +0000</resolved>
                                    <version>2.6.10</version>
                                                    <component>Admin</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="1058374" author="ramon.fernandez" created="Mon, 12 Oct 2015 20:13:40 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=filip.havlicek%40livesport.eu&quot; class=&quot;user-hover&quot; rel=&quot;filip.havlicek@livesport.eu&quot;&gt;filip.havlicek@livesport.eu&lt;/a&gt;, the reason these collections are not removed as part of the upgrade and no instructions to remove them are provided is to allow users to revert to 2.4 if they need to.&lt;/p&gt;

&lt;p&gt;After upgrading to 2.6 these collections are not used for anything, so it&apos;s safe to remove them as you described above. To drop them directly you may need to add drop privileges explicitly, but I haven&apos;t tested that approach.&lt;/p&gt;</comment>
                            <comment id="1053752" author="filip.havlicek@livesport.eu" created="Wed, 7 Oct 2015 13:27:46 +0000"  >&lt;p&gt;Yes, it&apos;s true, but nobody knows or nobody want to help..&lt;br/&gt;
Isn&apos;t possible move ticket to different project? Because this theme isn&apos;t in documentation and I hope that&apos;s not only me, who is interested about it. I think this should be a part of documentation of upgrade process from 2.4 to 2.6.&lt;/p&gt;</comment>
                            <comment id="1053732" author="ramon.fernandez" created="Wed, 7 Oct 2015 13:09:57 +0000"  >&lt;p&gt;I see that you&apos;ve already &lt;a href=&quot;https://groups.google.com/forum/#!topic/mongodb-user/mHCCeXJLARg&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;posted your question&lt;/a&gt; in the &lt;a href=&quot;http://groups.google.com/group/mongodb-user&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongodb-user group&lt;/a&gt;, and since we keep the SERVER project for &lt;br/&gt;
reporting bugs or feature suggestions for the MongoDB server we&apos;re closing this ticket.&lt;/p&gt;

&lt;p&gt;See also our &lt;a href=&quot;https://www.mongodb.org/about/support/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Technical Support page&lt;/a&gt; for additional support resources.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Ram&#243;n.&lt;/p&gt;</comment>
                            <comment id="1053671" author="filip.havlicek@livesport.eu" created="Wed, 7 Oct 2015 12:48:26 +0000"  >&lt;p&gt;OK.. I find a way which works.&lt;br/&gt;
At first I need a user with &quot;restore&quot; role (my user has &quot;root&quot; and &quot;restore&quot; role).&lt;br/&gt;
Then I can rename  system.users with command db.system.users.renameCollection(&quot;oldusers&quot;) and oldusers collection is possible to drop.&lt;br/&gt;
The same way I drop system.backup_users and system.new_users in admin database.&lt;/p&gt;

&lt;p&gt;Is this a safe way how to drop old $database.system.users, admin.system.backup_users, admin.system.new_users collections? Is it safe for replica sets and sharding clusters too?&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 7 Oct 2015 13:09:57 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        8 years, 18 weeks, 2 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></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>wcmon123456123@gmail.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            8 years, 18 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>filip.havlicek@livesport.eu</customfieldvalue>
            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrksm7:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</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|hsflbz:</customfieldvalue>

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