Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change User Status FORCE_CHANGE_PASSWORD?

Using AWS Cognito, I want to create dummy users for testing purposes.

I then use the AWS Console to create such user, but the user has its status set to FORCE_CHANGE_PASSWORD. With that value, this user cannot be authenticated.

Is there a way to change this status?

UPDATE Same behavior when creating user from CLI

like image 648
Dominique Vial Avatar asked Oct 27 '16 14:10

Dominique Vial


People also ask

How do I verify my email on Cognito?

Amazon Cognito can automatically verify email addresses or phone numbers. To do this verification, Amazon Cognito sends a verification code or a verification link. For email addresses, Amazon Cognito can send a code or a link in an email message. For phone numbers, Amazon Cognito sends a code in an SMS text message.

How do I change my first password in Linux?

Changing user passwords on Linux First sign on or “su” or “sudo” to the “root” account on Linux, run: sudo -i. Then type, passwd tom to change a password for tom user. The system will prompt you to enter a password twice.

How can I verify my Cognito account?

Call the SignUp API action, and provide the email address and phone number for the UserAttributes parameter. At this point, Amazon Cognito sends a verification code to the user's phone. In your app interface, present a confirmation page where the user enters the verification code.

What is Admin_no_srp_auth?

ADMIN_USER_PASSWORD_AUTH was formerly known as ADMIN_NO_SRP_AUTH. If you have a server-side app: It calls the AdminInitiateAuth API. This requires AWS admin credentials & returns the authentication parameters. It then calls the AdminRespondToAuthChallenge API, which also requires AWS admin credentials.


1 Answers

This has finally been added to AWSCLI: https://docs.aws.amazon.com/cli/latest/reference/cognito-idp/admin-set-user-password.html

You can change a user's password and update status using:

aws cognito-idp admin-set-user-password \
  --user-pool-id <your-user-pool-id> \
  --username <username> \
  --password <password> \
  --permanent

Before using this, you may need to update your AWS CLI using:

pip3 install awscli --upgrade

like image 251
joe Avatar answered Sep 29 '22 21:09

joe