user_management.md 1.74 KB
Newer Older
Marin Jankovski's avatar
Marin Jankovski committed
1 2
# User management

3
## Add user as a developer to all projects
4

5
```bash
6 7 8
# omnibus-gitlab
sudo gitlab-rake gitlab:import:user_to_projects[username@domain.tld]

9
# installation from source
exromany's avatar
exromany committed
10
bundle exec rake gitlab:import:user_to_projects[username@domain.tld] RAILS_ENV=production
11 12
```

13
## Add all users to all projects
14 15 16

Notes:

17
- admin users are added as masters
18

19
```bash
20 21 22
# omnibus-gitlab
sudo gitlab-rake gitlab:import:all_users_to_all_projects

23
# installation from source
exromany's avatar
exromany committed
24
bundle exec rake gitlab:import:all_users_to_all_projects RAILS_ENV=production
25
```
26

27
## Add user as a developer to all groups
28

29
```bash
30 31 32
# omnibus-gitlab
sudo gitlab-rake gitlab:import:user_to_groups[username@domain.tld]

33
# installation from source
exromany's avatar
exromany committed
34
bundle exec rake gitlab:import:user_to_groups[username@domain.tld] RAILS_ENV=production
35 36
```

37
## Add all users to all groups
38 39 40

Notes:

41
- admin users are added as owners so they can add additional users to the group
42

43
```bash
44 45 46
# omnibus-gitlab
sudo gitlab-rake gitlab:import:all_users_to_all_groups

47
# installation from source
exromany's avatar
exromany committed
48
bundle exec rake gitlab:import:all_users_to_all_groups RAILS_ENV=production
49
```
50 51 52

## Maintain tight control over the number of active users on your GitLab installation

53
- Enable this setting to keep new users blocked until they have been cleared by the admin (default: false).
54 55 56


```
57 58
block_auto_created_users: false
```
59 60 61 62

## Disable Two-factor Authentication (2FA) for all users

This task will disable 2FA for all users that have it enabled. This can be
63 64
useful if GitLab's `config/secrets.yml` file has been lost and users are unable
to login, for example.
65 66 67 68 69 70 71 72

```bash
# omnibus-gitlab
sudo gitlab-rake gitlab:two_factor:disable_for_all_users

# installation from source
bundle exec rake gitlab:two_factor:disable_for_all_users RAILS_ENV=production
```