# ---
# Update a user password
# ---

# directly update user passwords via the Docker console using the Rails command: 
#
#     User.find_by(email: "<email>").update_attribute(:password,"<new password>")
#


# 1. SSH into the server.


# 2. iEnter docker Container greenlight ( version 3.x)
#
#     docker exec -it greenlight-v3 bash
#
docker exec -it greenlight-v3 bash


# 3. Run bundle 'bundle exec rails c'
#
#     aae18f99e028:/usr/src/app# bundle exec rails c
#
bundle exec rails c


# 4. Change user password
#
#     greenlight(prod)> User.find_by(email: "<email>").update_attribute(:password,"<new password>").
#
#  or
#
#     greenlight(prod)> user = User.find_by!(email: 'user@example.com')
#     greenlight(prod)> user.update!(password: 'NewPassword', password_confirmation: 'NewPassword')
#
User.find_by(email: "inge@so36.net").update_attribute(:password, "pacotaibo2")
Description
No description provided
Readme 131 KiB
Languages
Shell 100%