2020-10-26 21:08:22 +00:00
---
2021-02-03 21:09:17 +00:00
stage: Manage
2022-01-27 03:14:06 +00:00
group: Authentication and Authorization
2022-09-21 21:13:33 +00:00
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
2020-10-26 21:08:22 +00:00
---
2021-10-14 00:12:08 +00:00
# Modify global user settings **(FREE SELF)**
2019-03-15 03:19:04 +00:00
GitLab administrators can modify user settings for the entire GitLab instance.
2022-09-29 21:08:27 +00:00
## Use configuration files to prevent new users from creating top-level groups
2019-03-15 03:19:04 +00:00
2022-09-07 06:13:04 +00:00
By default, new users can create top-level groups. To disable new users'
2022-09-29 21:08:27 +00:00
ability to create top-level groups (does not affect existing users' setting), GitLab administrators can modify this setting:
- In GitLab 15.5 and later, using either:
2022-10-28 00:11:00 +00:00
- The [GitLab UI ](../user/admin_area/settings/account_and_limit_settings.md#prevent-new-users-from-creating-top-level-groups ).
2022-09-29 21:08:27 +00:00
- The [application setting API ](../api/settings.md#change-application-settings ).
- In GitLab 15.4 and earlier, in a configuration file by following the steps in this section.
To disable new users' ability to create top-level groups using the configuation file:
2019-03-15 03:19:04 +00:00
2021-10-14 00:12:08 +00:00
**Omnibus GitLab installations**
2019-03-15 03:19:04 +00:00
2021-10-14 00:12:08 +00:00
1. Edit `/etc/gitlab/gitlab.rb` and add the following line:
2019-03-15 03:19:04 +00:00
2021-10-14 00:12:08 +00:00
```ruby
gitlab_rails['gitlab_default_can_create_group'] = false
```
2019-03-15 03:19:04 +00:00
2021-10-14 00:12:08 +00:00
1. [Reconfigure and restart GitLab ](restart_gitlab.md#omnibus-installations ).
2019-03-15 03:19:04 +00:00
2021-10-14 00:12:08 +00:00
**Source installations**
2019-03-15 03:19:04 +00:00
2021-10-14 00:12:08 +00:00
1. Edit `config/gitlab.yml` and uncomment the following line:
2019-03-15 03:19:04 +00:00
2021-10-14 00:12:08 +00:00
```yaml
# default_can_create_group: false # default: true
```
2019-03-15 03:19:04 +00:00
2021-10-14 00:12:08 +00:00
1. [Restart GitLab ](restart_gitlab.md#installations-from-source ).
2019-03-15 03:19:04 +00:00
2022-09-07 06:13:04 +00:00
### Prevent existing users from creating top-level groups
Administrators can:
- Use the Admin Area to [prevent an existing user from creating top-level groups ](../user/admin_area/index.md#prevent-a-user-from-creating-groups ).
- Use the [modify an existing user API endpoint ](../api/users.md#user-modification ) to change the `can_create_group` setting.
2021-10-14 00:12:08 +00:00
## Prevent users from changing their usernames
2019-03-15 03:19:04 +00:00
2021-10-14 00:12:08 +00:00
By default, new users can change their usernames. To disable your users'
ability to change their usernames:
**Omnibus GitLab installations**
1. Edit `/etc/gitlab/gitlab.rb` and add the following line:
```ruby
gitlab_rails['gitlab_username_changing_enabled'] = false
```
1. [Reconfigure and restart GitLab ](restart_gitlab.md#omnibus-installations ).
**Source installations**
1. Edit `config/gitlab.yml` and uncomment the following line:
```yaml
# username_changing_enabled: false # default: true - User can change their username/namespace
```
1. [Restart GitLab ](restart_gitlab.md#installations-from-source ).