debian-mirror-gitlab/doc/user/profile/account/create_accounts.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

68 lines
2.5 KiB
Markdown
Raw Normal View History

2019-12-04 20:38:33 +05:30
---
type: reference
2020-06-23 00:09:42 +05:30
stage: Manage
2022-04-04 11:22:00 +05:30
group: Authentication and Authorization
2022-11-25 23:54:43 +05:30
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
2019-12-04 20:38:33 +05:30
---
2021-03-11 19:13:27 +05:30
# Creating users **(FREE SELF)**
2019-12-04 20:38:33 +05:30
You can create users:
2022-08-13 15:12:31 +05:30
- [Manually through the sign-in page](#create-users-on-sign-in-page).
- [Manually in the Admin Area](#create-users-in-admin-area).
- [Manually using the API](../../../api/users.md).
- [Automatically through user authentication integrations](#create-users-through-authentication-integrations).
2019-12-04 20:38:33 +05:30
2022-08-13 15:12:31 +05:30
## Create users on sign-in page
2019-12-04 20:38:33 +05:30
2023-05-27 22:25:52 +05:30
Prerequisite:
2021-09-04 01:27:46 +05:30
2023-05-27 22:25:52 +05:30
- [Sign-up must be enabled](../../admin_area/settings/sign_up_restrictions.md).
2022-08-13 15:12:31 +05:30
Users can create their own accounts by either:
2019-12-04 20:38:33 +05:30
2022-08-13 15:12:31 +05:30
- Selecting the **Register now** link on the sign-in page.
- Navigating to your GitLab instance's sign-up link. For example: `https://gitlab.example.com/users/sign_up`.
2019-12-04 20:38:33 +05:30
2020-03-13 15:44:24 +05:30
## Create users in Admin Area
2019-12-04 20:38:33 +05:30
2023-05-27 22:25:52 +05:30
Prerequisite:
2022-08-13 15:12:31 +05:30
2023-05-27 22:25:52 +05:30
- You must have administrator access to the instance.
2022-08-13 15:12:31 +05:30
To create a user manually:
2019-12-04 20:38:33 +05:30
2022-10-11 01:57:18 +05:30
1. On the top bar, select **Main menu > Admin**.
2021-09-04 01:27:46 +05:30
1. On the left sidebar, select **Overview > Users** (`/admin/users`).
1. Select **New user**.
2022-08-13 15:12:31 +05:30
1. Complete the fields.
1. Select **Create user**.
2019-12-04 20:38:33 +05:30
2021-01-03 14:25:43 +05:30
## Create users through authentication integrations
2019-12-04 20:38:33 +05:30
2021-09-04 01:27:46 +05:30
Users are:
2019-12-04 20:38:33 +05:30
2021-01-03 14:25:43 +05:30
- Automatically created upon first sign in with the [LDAP integration](../../../administration/auth/ldap/index.md).
2021-09-04 01:27:46 +05:30
- Created when first signing in using an [OmniAuth provider](../../../integration/omniauth.md) if
the `allow_single_sign_on` setting is present.
- Created when first signing with [Group SAML](../../group/saml_sso/index.md).
- Automatically created by [SCIM](../../group/saml_sso/scim_setup.md) when the user is created in
the identity provider.
2023-01-13 00:05:48 +05:30
## Create users through the Rails console
WARNING:
Commands that change data can cause damage if not run correctly or under the right conditions. Always run commands in a test environment first and have a backup instance ready to restore.
To create a user through the Rails console:
1. [Start a Rails console session](../../../administration/operations/rails_console.md#starting-a-rails-console-session).
1. Run the following commands:
```ruby
u = User.new(username: 'test_user', email: 'test@example.com', name: 'Test User', password: 'password', password_confirmation: 'password')
u.skip_confirmation! # Use it only if you wish user to be automatically confirmed. If skipped, user receives confirmation e-mail
u.save!
```