How to unblock an LDAP blocked user in Gitlab

    xiaoxiao2024-04-21  5

    It seems that if an LDAP user gets "LDAP blocked" intentionally or by some glitch in Gitlab then the user cannot be unblocked in the Web interface of Gitlab. This can be solved as follows on Linux. Log onto your Linux that hosts your Gitlab, become root, and execute the following commands: su git cd ~/gitlab bundle exec rails c production Before the command "bundle exec rails c production", you may need to add the location of the file "bundle" to the variable PATH. For example, you may need to execute export PATH=$PATH:/usr/local/bin if the file "bundle" is in the directory /usr/local/bin. Wait for the start of "bundle exec rails c production" and appearance of the command prompt ">". In the appeared CLI, execute the following commands: user = User.find_by_email("myuser@example.com") user.state = "active" user.save exit Use the real email address of the user in Gitlab instead of myuser@example.com. I found this solution and posted on https://gitlab.com/gitlab-org/gitlab-ce/issues/13179.

    我的步骤:

    1. su git

    2. cd /opt/gitlab/embedded/service/gitlab-rails 3. export PATH=$PATH:/opt/gitlab/embedded/bin/ 4. bundle exec rails c production    user = User.find_by_email("xxx@xxxx.com")    user.state = "active"   user.save exit
    转载请注明原文地址: https://ju.6miu.com/read-1288217.html
    最新回复(0)