Stash is now known as Bitbucket Server.
See the

Unknown macro: {spacejump}

of this page, or visit the Bitbucket Server documentation home page.

Stash comes with an internal user directory already built-in that is enabled by default at installation. When you create the first administrator during the setup procedure, that administrator's username and other details are stored in the internal directory.

Stash Admins and Sys Admins can manage users and groups in Stash as described on this page. You can also set up Stash to use external user directories.

Note that:

On this page:

Creating a user

In the administration area, click Users (under 'Accounts') and then Create user (on the 'Users' screen)

Complete the form. You can either set the user's password now, or have Stash email the user with a link that they can use to set the password themselves:

Once you've created the user, click Change permissions to set up their access permissions. Note that a user doesn't have access to Stash until global access permissions have been set.

See Global permissions for more information.

Creating a group

In the administration area, click Groups (under 'Accounts') and then Create group. Enter the name for the new group, and click Create group (again):

Now you can add users to your new group (see the next section).

Adding users to groups

You can add users to groups in two ways:

From the user account page

To add a user to a group from the user's account page, click Users in the Administration section, and then use the filter to find the user:

On the account page for the user, use the filter to find a group to which you want to add the user:

Click Add for each group in turn.

From the group page

To add a user to a group from the group's page, click Groups (under "Accounts') in the administration area, and use the filter to find the group:

On the page for the group, use the filter to find a user whom you wish to add to the group:

Click Add for each user you select, to make them a member of the group.

Changing usernames

You can change the username for a user account that is hosted in Stash's internal user directory. Go to Users in the Administration section, and use the filter to find the user. On the account page for the user, click Rename.

Deleting users and groups

You can delete a user or group from Stash's internal user directory, or the external directory from which Stash sources users, such as an LDAP, Crowd or JIRA server.

When a user or group is deleted from such a directory, Stash checks to see if that user still exists in another directory:

  • If the user or group does exist in another directory, Stash assumes the administrator intended to migrate the user or group between directories and we leave their data intact.
  • If the user or group does not exist in another directory, Stash assumes the intent was to permanently delete them, and we delete the users permissions, SSH keys and 'rememberme' tokens.
  • If an entire directory is deleted Stash always assumes it is a migration and does nothing to clean up after users and groups.
  • Content which might be of historical interest (comments, pull requests, etc.) is not deleted when a user or group is. Only authentication, authorisation and data which serves no purpose to a user who can no longer log in is removed.
  • In some situations, reordering the directories will change the directory that the current user comes from, if a user with the same username happens to exist in both. This behaviour can be used in some cases to create a copy of the existing configuration, move it to the top, then remove the old one. Note, however, that duplicate usernames are not a supported configuration.
  • You can enable or disable a directory at any time. If you disable a directory, your configuration details will remain but Stash will not recognise the users and groups in that directory.
  • You cannot edit, disable or delete the directory that your own user account belongs to. This prevents administrators from locking themselves out of Stash, and applies to internal as well as external directories.
  • You cannot remove the internal directory. This limitation aligns with the recommendation that you always keep an administrator or sysadmin account active in the Stash internal directory, so that you can troubleshoot problems with your user directories.
  • You have to disable a directory before you can remove it. Removing a directory will remove the details from the database.