VA-003 Utilize Vault CLI and API Practice Question
Which Vault CLI command is used to authenticate a user with a username and password to the userpass auth method?
⚠ Common exam trap
HashiCorp often tests the exact CLI syntax, and the trap here is that candidates confuse `vault login` with non-existent commands like `vault auth` or `vault authenticate`, or misuse `vault token create` which is for generating tokens from an existing token, not for initial authentication.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
vault login -method=userpass username=alice password=secret
`vault login -method=userpass` is the standard Vault CLI command to authenticate against the userpass auth method, passing the username and password as parameters. This command triggers the login endpoint (`/v1/auth/userpass/login/:username`) and returns a client token upon successful authentication.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
vault login -method=userpass username=alice password=secret
Why this is correct
This authenticates using the userpass method with provided credentials.
- ✗
vault auth userpass username=alice password=secret
Why it's wrong here
'vault auth' is not a valid command; the correct command is 'vault login'.
- ✗
vault token create -policy=userpass
Why it's wrong here
This creates a token but does not authenticate a user via userpass.
- ✗
vault authenticate userpass username=alice password=secret
Why it's wrong here
'vault authenticate' is not a valid command.
Go deeper
Related to this question
About these practice questions
Courseiva writes every VA-003 question from scratch — 498 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This VA-003 practice question is part of Courseiva's free HashiCorp certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the VA-003 exam.