# Stash Latest (2.9) : Users and groups

Added by pwatson , edited by pwatson on Nov 19, 2013

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:

- Even after users have been added to the Stash user directory, they will not be able to log in to Stash until they have been given global access permissions.
- Permissions can also be applied separately at the level of projects, repositories and branches.

On this page:

Related pages:

- Getting started with Stash
- External user directories

## Creating a user

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

Once you've created a user, click Change permissions to set up their access permissions.

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:

## Adding users to groups

You can add users to groups in two ways:

- add a particular user to multiple groups, from the user account page in the admin area.
- add multiple users to a particular group, from the group's page.

### From the user account

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

On the account page for the user, click Add to Group to go to the list of available groups:

You can use the filter to find the group you want to add the user to. Hover to the right of the group name and click Add Group to make the user a member of the group.

Click Done when you have finished.

### From the group page

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

On the page for the group, click Add Users to go to the list of available users.

In the users list, use the filter to find a user. Hover to the right of the user's name and click Add user to make them a member of the group:

Click Done when you have finished.

## 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.

##### Notes

- 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.

##### Limitations

- 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.

## Attachments:

STASH01_newUser.png (image/png)
STASH01_newGroup.png (image/png)
Stash10_plusIcon.png (image/png)
Stash10_global Permissions.png (image/png)
skitched-20120229-114405.jpg (image/jpeg)
Screen shot 2012-02-29 at 11.47.48 AM.png (image/png)
skitched-20120229-115054.jpg (image/jpeg)
skitched-20120229-115359.jpg (image/jpeg)
Screen shot 2012-02-29 at 11.56.55 AM.png (image/png)
Screen shot 2012-02-29 at 11.58.19 AM.png (image/png)
Screen shot 2012-02-29 at 11.58.48 AM.png (image/png)
skitched-20120229-131132.jpg (image/jpeg)
Screen shot 2012-02-29 at 1.11.59 PM.png (image/png)
skitched-20120229-131608.jpg (image/jpeg)
skitched-20120327-143152.jpg (image/jpeg)
image2012-3-27 14:33:51.png (image/png)
image2012-3-27 14:34:35.png (image/png)
skitched-20120327-143529.jpg (image/jpeg)
image2012-3-27 14:36:3.png (image/png)
skitched-20120327-143721.jpg (image/jpeg)
skitched-20120327-143759.jpg (image/jpeg)
image2012-3-27 14:38:38.png (image/png)
Stash_1_1_addingusers.png (image/png)
Sash_1_1_create_user.png (image/png)
STash_1_1_user_permissions.png (image/png)
Stash_1_1_addinggroups.png (image/png)
Stash_1_1_create_group.png (image/png)
Stash_1_1_groupname.png (image/png)
Stash_1_1_add_users_to_group.png (image/png)
Stash_1_1_addingusers2.png (image/png)
Stash_1_1_filtergroups.png (image/png)
Stash_1_1_filtergroups.png (image/png)
Stash_1_1_add_users.png (image/png)
Stash_1_1_create_user.png (image/png)
Stash_1_1_create_new_group.png (image/png)
Stash_1_1_find_user.png (image/png)
Stash_1_1_add_user_to_group.png (image/png)
Stash_1_1_add_group_to_user.png (image/png)
Stash_1_1_add_group_to_user.png (image/png)
Stash_1_1_add_user_to_group.png (image/png)
Stash_1_1_find_user.png (image/png)
Stash_1_1_create_new_group.png (image/png)
Stash_1_1_create_user.png (image/png)
Stash_1_1_add_users.png (image/png)
Stash_1_1_filtergroups.png (image/png)
Stash_1_1_addingusers2.png (image/png)
Stash_1_1_add_users_to_group.png (image/png)
Stash_1_1_groupname.png (image/png)
Stash_1_1_create_group.png (image/png)
Stash_1_1_addinggroups.png (image/png)
STash_1_1_user_permissions.png (image/png)
Sash_1_1_create_user.png (image/png)
Stash_1_1_addingusers.png (image/png)
image2012-3-27 14:38:38.png (image/png)
skitched-20120327-143759.jpg (image/jpeg)
skitched-20120327-143721.jpg (image/jpeg)
image2012-3-27 14:36:3.png (image/png)
skitched-20120327-143529.jpg (image/jpeg)
image2012-3-27 14:34:35.png (image/png)
image2012-3-27 14:33:51.png (image/png)
skitched-20120327-143152.jpg (image/jpeg)
skitched-20120229-131608.jpg (image/jpeg)
Screen shot 2012-02-29 at 1.11.59 PM.png (image/png)
skitched-20120229-131132.jpg (image/jpeg)
Screen shot 2012-02-29 at 11.58.48 AM.png (image/png)
Screen shot 2012-02-29 at 11.58.19 AM.png (image/png)
Screen shot 2012-02-29 at 11.56.55 AM.png (image/png)
skitched-20120229-115359.jpg (image/jpeg)
skitched-20120229-115054.jpg (image/jpeg)
Screen shot 2012-02-29 at 11.47.48 AM.png (image/png)
skitched-20120229-114405.jpg (image/jpeg)
Stash10_global Permissions.png (image/png)
Stash10_plusIcon.png (image/png)
STASH01_newGroup.png (image/png)
STASH01_newUser.png (image/png)
Stash12_create_user.png (image/png)
Stash12_user_permissions.png (image/png)
Stash12_add_users_to_group.png (image/png)
Stash12_find_user.png (image/png)
Stash12_add_user_to_group.png (image/png)
Stash12_filter_groups.png (image/png)
Stash12_add_users_to_group.png (image/png)
Stash12_add_users_to_group.png (image/png)
Stash12_filter_groups.png (image/png)
Stash12_add_user_to_group.png (image/png)
Stash12_find_user.png (image/png)
Stash12_user_permissions.png (image/png)
Stash12_create_user.png (image/png)
STASH01_newUser.png (image/png)
STASH01_newGroup.png (image/png)
Stash10_plusIcon.png (image/png)
Stash10_global Permissions.png (image/png)
skitched-20120229-114405.jpg (image/jpeg)
Screen shot 2012-02-29 at 11.47.48 AM.png (image/png)
skitched-20120229-115054.jpg (image/jpeg)
skitched-20120229-115359.jpg (image/jpeg)
Screen shot 2012-02-29 at 11.56.55 AM.png (image/png)
Screen shot 2012-02-29 at 11.58.19 AM.png (image/png)
Screen shot 2012-02-29 at 11.58.48 AM.png (image/png)
skitched-20120229-131132.jpg (image/jpeg)
Screen shot 2012-02-29 at 1.11.59 PM.png (image/png)
skitched-20120229-131608.jpg (image/jpeg)
skitched-20120327-143152.jpg (image/jpeg)
image2012-3-27 14:33:51.png (image/png)
image2012-3-27 14:34:35.png (image/png)
skitched-20120327-143529.jpg (image/jpeg)
image2012-3-27 14:36:3.png (image/png)
skitched-20120327-143721.jpg (image/jpeg)
skitched-20120327-143759.jpg (image/jpeg)
image2012-3-27 14:38:38.png (image/png)
Stash_1_1_addingusers.png (image/png)
Sash_1_1_create_user.png (image/png)
STash_1_1_user_permissions.png (image/png)
Stash_1_1_addinggroups.png (image/png)
Stash_1_1_create_group.png (image/png)
Stash_1_1_groupname.png (image/png)
Stash_1_1_add_users_to_group.png (image/png)
Stash_1_1_addingusers2.png (image/png)
Stash_1_1_filtergroups.png (image/png)
Stash_1_1_add_users.png (image/png)
Stash_1_1_create_user.png (image/png)
Stash_1_1_create_new_group.png (image/png)
Stash_1_1_find_user.png (image/png)
Stash_1_1_add_user_to_group.png (image/png)
Stash_1_1_add_group_to_user.png (image/png)
Stash_1_1_add_group_to_user.png (image/png)
Stash_1_1_add_user_to_group.png (image/png)
Stash_1_1_find_user.png (image/png)
Stash_1_1_create_new_group.png (image/png)
Stash_1_1_create_user.png (image/png)
Stash_1_1_add_users.png (image/png)
Stash_1_1_filtergroups.png (image/png)
Stash_1_1_addingusers2.png (image/png)
Stash_1_1_add_users_to_group.png (image/png)
Stash_1_1_groupname.png (image/png)
Stash_1_1_create_group.png (image/png)
Stash_1_1_addinggroups.png (image/png)
STash_1_1_user_permissions.png (image/png)
Sash_1_1_create_user.png (image/png)
Stash_1_1_addingusers.png (image/png)
image2012-3-27 14:38:38.png (image/png)
skitched-20120327-143759.jpg (image/jpeg)
skitched-20120327-143721.jpg (image/jpeg)
image2012-3-27 14:36:3.png (image/png)
skitched-20120327-143529.jpg (image/jpeg)
image2012-3-27 14:34:35.png (image/png)
image2012-3-27 14:33:51.png (image/png)
skitched-20120327-143152.jpg (image/jpeg)
skitched-20120229-131608.jpg (image/jpeg)
Screen shot 2012-02-29 at 1.11.59 PM.png (image/png)
skitched-20120229-131132.jpg (image/jpeg)
Screen shot 2012-02-29 at 11.58.48 AM.png (image/png)
Screen shot 2012-02-29 at 11.58.19 AM.png (image/png)
Screen shot 2012-02-29 at 11.56.55 AM.png (image/png)
skitched-20120229-115359.jpg (image/jpeg)
skitched-20120229-115054.jpg (image/jpeg)
Screen shot 2012-02-29 at 11.47.48 AM.png (image/png)
skitched-20120229-114405.jpg (image/jpeg)
Stash10_global Permissions.png (image/png)
Stash10_plusIcon.png (image/png)
STASH01_newGroup.png (image/png)
STASH01_newUser.png (image/png)
Stash12_create_user.png (image/png)
Stash12_user_permissions.png (image/png)
Stash12_find_user.png (image/png)
Stash12_add_user_to_group.png (image/png)
Stash12_filter_groups.png (image/png)
Stash12_add_users_to_group.png (image/png)
Stash_1_1_add_group_to_user.png (image/png)
Stash_1_1_add_user_to_group.png (image/png)
Stash_1_1_find_user.png (image/png)
Stash_1_1_create_new_group.png (image/png)
Stash_1_1_create_user.png (image/png)
Stash_1_1_add_users.png (image/png)
Stash_1_1_filtergroups.png (image/png)
Stash_1_1_addingusers2.png (image/png)
Stash_1_1_add_users_to_group.png (image/png)
Stash_1_1_groupname.png (image/png)
Stash_1_1_create_group.png (image/png)
Stash_1_1_addinggroups.png (image/png)
STash_1_1_user_permissions.png (image/png)
Sash_1_1_create_user.png (image/png)
Stash_1_1_addingusers.png (image/png)
image2012-3-27 14:38:38.png (image/png)
skitched-20120327-143759.jpg (image/jpeg)
skitched-20120327-143721.jpg (image/jpeg)
image2012-3-27 14:36:3.png (image/png)
skitched-20120327-143529.jpg (image/jpeg)
image2012-3-27 14:34:35.png (image/png)
image2012-3-27 14:33:51.png (image/png)
skitched-20120327-143152.jpg (image/jpeg)
skitched-20120229-131608.jpg (image/jpeg)
Screen shot 2012-02-29 at 1.11.59 PM.png (image/png)
skitched-20120229-131132.jpg (image/jpeg)
Screen shot 2012-02-29 at 11.58.48 AM.png (image/png)
Screen shot 2012-02-29 at 11.58.19 AM.png (image/png)
Screen shot 2012-02-29 at 11.56.55 AM.png (image/png)
skitched-20120229-115359.jpg (image/jpeg)
skitched-20120229-115054.jpg (image/jpeg)
Screen shot 2012-02-29 at 11.47.48 AM.png (image/png)
skitched-20120229-114405.jpg (image/jpeg)
Stash10_global Permissions.png (image/png)
Stash10_plusIcon.png (image/png)
STASH01_newGroup.png (image/png)
STASH01_newUser.png (image/png)
Stash12_create_user.png (image/png)
Stash12_user_permissions.png (image/png)
Stash12_find_user.png (image/png)
Stash12_add_user_to_group.png (image/png)
Stash12_filter_groups.png (image/png)
Stash12_add_users_to_group.png (image/png)
Stash12_add_users_to_group.png (image/png)
Stash12_filter_groups.png (image/png)
Stash12_add_user_to_group.png (image/png)
Stash12_find_user.png (image/png)
Stash12_user_permissions.png (image/png)
Stash12_create_user.png (image/png)
STASH01_newUser.png (image/png)
STASH01_newGroup.png (image/png)
Stash10_plusIcon.png (image/png)
Stash10_global Permissions.png (image/png)
skitched-20120229-114405.jpg (image/jpeg)
Screen shot 2012-02-29 at 11.47.48 AM.png (image/png)
skitched-20120229-115054.jpg (image/jpeg)
skitched-20120229-115359.jpg (image/jpeg)
Screen shot 2012-02-29 at 11.56.55 AM.png (image/png)
Screen shot 2012-02-29 at 11.58.19 AM.png (image/png)
Screen shot 2012-02-29 at 11.58.48 AM.png (image/png)
skitched-20120229-131132.jpg (image/jpeg)
Screen shot 2012-02-29 at 1.11.59 PM.png (image/png)
skitched-20120229-131608.jpg (image/jpeg)
skitched-20120327-143152.jpg (image/jpeg)
image2012-3-27 14:33:51.png (image/png)
image2012-3-27 14:34:35.png (image/png)
skitched-20120327-143529.jpg (image/jpeg)
image2012-3-27 14:36:3.png (image/png)
skitched-20120327-143721.jpg (image/jpeg)
skitched-20120327-143759.jpg (image/jpeg)
image2012-3-27 14:38:38.png (image/png)
Stash_1_1_addingusers.png (image/png)
Sash_1_1_create_user.png (image/png)
STash_1_1_user_permissions.png (image/png)
Stash_1_1_addinggroups.png (image/png)
Stash_1_1_create_group.png (image/png)
Stash_1_1_groupname.png (image/png)
Stash_1_1_add_users_to_group.png (image/png)
Stash_1_1_addingusers2.png (image/png)
Stash_1_1_filtergroups.png (image/png)
Stash_1_1_add_users.png (image/png)
Stash_1_1_create_user.png (image/png)
Stash_1_1_create_new_group.png (image/png)
Stash_1_1_find_user.png (image/png)
Stash_1_1_add_user_to_group.png (image/png)
Stash_1_1_add_group_to_user.png (image/png)
STASH24_create_user.png (image/png)
STASH24_create_user2.png (image/png)
STASH24_user_permissions.png (image/png)
STASH24_create_group.png (image/png)
STASH24_add_users.png (image/png)
STASH24_find_group.png (image/png)
STASH24_find_user.png (image/png)
STASH24_find_user.png (image/png)
STASH24_add_user_togroup.png (image/png)
Stash_1_1_add_group_to_user.jpeg (image/jpeg)
STASH24_filter_for_user.png (image/png)
STASH24_choose_group.png (image/png)
STASH29_user_permissions.png (image/png)
STASH29_add_user_togroup.png (image/png)