Prerequisites
- Vault CLI installed and configured
- Vault server unsealed and reachable
- A Vault token with
rootorsudoprivileges
1. Verify Existing Auth Methods
Before enabling new methods, check which authentication backends are active:The
token method is enabled by default and provides basic token authentication.2. Enable the Userpass Auth Method
Activate theuserpass backend at its default path:
3. Create Userpass Users
Add individual users underauth/userpass/users. Each user can be assigned one or more policies.
3.1 Create User “frank”
3.2 Create User “jamie”
Storing plaintext passwords in scripts can be insecure. Consider using environment variables or a secure secrets store.
4. List and Inspect User Configurations
4.1 List All Users
4.2 Read a User’s Settings
Inspect configuration for userjamie:
5. Authenticate with Userpass
After creating users, log in using theuserpass method. Each login issues a distinct Vault token.