BigW Consortium Gitlab

user_management.md 2.28 KB
Newer Older
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 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 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 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 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
```
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87

## Clear authentication tokens for all users. Important! Data loss!

Clear authentication tokens for all users in the GitLab database. This
task is useful if your users' authentication tokens might have been exposed in
any way. All the existing tokens will become invalid, and new tokens are
automatically generated upon sign-in or user modification.

```
# omnibus-gitlab
sudo gitlab-rake gitlab:users:clear_all_authentication_tokens

# installation from source
bundle exec rake gitlab:users:clear_all_authentication_tokens RAILS_ENV=production
```