How do I remove an internal user with a duplicate username from an AD server?

In the User Management console of Bamboo, I'm currently unable to remove the local user (no delete link for either AD or local user).

2 answers

0 vote

Hello Curtis,

Thank you for your question.

In "<bamboo-home>/xml-data/configuration/atlassian-user.xml" you should have the following configuration:

&lt;atlassian-user&gt;
    &lt;repositories&gt;
        &lt;!-- LDAP repository --&gt;
        &lt;ldap key="ldapRepository" name="Active Directory LDAP Repository" cache="true"&gt;
            &lt;!-- your LDAP configuration --&gt;
        &lt;/ldap&gt;
         
        &lt;!-- Default bamboo user repository --&gt;
        &lt;hibernate name="Hibernate Repository" key="hibernateRepository" description="Hibernate Repository" cache="true"/&gt;
    &lt;/repositories&gt;
&lt;/atlassian-user&gt;

Based on the above configuration, you are able to log in to Bamboo using LDAP users and Bamboo Internal Directory users. In case you are not using Bamboo Internal Directory users to log in to Bamboo, you could go to the same "atlassian-user.xml" configuration file and comment out <hibernate/>. As a result, you should have:

&lt;atlassian-user&gt;
    &lt;repositories&gt;
        &lt;!-- LDAP repository --&gt;
        &lt;ldap key="ldapRepository" name="Active Directory LDAP Repository" cache="true"&gt;
            &lt;!-- your LDAP configuration --&gt;
        &lt;/ldap&gt;
         
        &lt;!-- Default bamboo user repository --&gt;
		&lt;!-- 
        &lt;hibernate name="Hibernate Repository" key="hibernateRepository" description="Hibernate Repository" cache="true"/&gt;
		--&gt;
    &lt;/repositories&gt;
&lt;/atlassian-user&gt;

Once the change is made, please stop and start Bamboo.

If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.

Thank you for your understanding.

Kind regards,
Rafael P. Sperafico
Atlassian Support

 

 

Daniel Rohan Atlassian Team Feb 08, 2017

Do not remove the internal directory under any circumstance as this will cause unexpected behavior in Bamboo.

0 vote
Daniel Rohan Atlassian Team Feb 08, 2017

Deleting using the UI is straightforward and since there is also no confirmation dialog the process is fast although admittedly, it requires a lot of clicking in the same place!

  1. Stop Bamboo.
  2. Comment out or remove the LDAP configuration from atlassian-user.xml.
  3. Start Bamboo.
  4. Log in as the system administrator. It is best practice to retain user #1 as the system administrator user just as long as there is no duplicate user in LDAP with the same username. The details of this user can be found by querying the database
    SELECT * FROM users WHERE id=1

    If you cannot remember the password for this user you can update it directly in the database by providing a known hash using these instructions: https://confluence.atlassian.com/bamboo/restoring-passwords-to-recover-admin-users-289277354.html

  5. Navigate to Administration > Security settings
  6. If the option "Read-only external user management?" is selected:
    1. Edit the settings.
    2. Deselect the option.
    3. Save the settings.
  7. Navigate to Administration > Users
  8. Click Delete in the Operations column next to each user that you want to delete. Note that you cannot delete the logged in user.

To re-add the LDAP configuration:

  1. Stop Bamboo..
  2. Edit the atlassian-user.xml configuration file.
  3. Start Bamboo.

Thanks,

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,097 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot