Proxmox VEXV · Security & HardeningAccess control
Auth realms, RBAC, TFA, and API tokens
What you'll learn
- Configure auth realms PAM, LDAP, AD, OIDC
- Apply RBAC roles and ACLs for least privilege
- Enable TFA MFA for admin accounts
- Use API tokens safely
Prerequisites
Verified against Proxmox VE 9.2.4 · Proxmox Backup Server 4.2.5 · Ceph Squid / Tentacle · Debian 13 (Trixie) · Linux kernel 7.0 (PVE 9.2 default) · 2026-08-07
Why this matters in production
Authentication is the front door. Authorisation is what users can do once inside. Both must be deliberate.
Auth realms
A realm is a source of authentication. Proxmox supports:
| Realm | Use |
|---|---|
pam | Local Linux users (/etc/passwd) |
pve | Proxmox-managed users (/etc/pve/user.cfg) |
ldap | LDAP directory |
ad | Active Directory |
openid | OpenID Connect (OIDC) |
Add an LDAP/AD realm:
pvesh create /access/domains --realm corp.example.com --type ad --server1 ad1.corp.example.com --server2 ad2.corp.example.com --base-dn 'DC=corp,DC=example,DC=com' --bind-dn 'CN=svc-proxmox,OU=Service,DC=corp,DC=example,DC=com' --bind-password '***' --secure 1 --port 636
RBAC
RBAC (Role-Based Access Control) assigns roles to users on paths.
| Built-in role | What it grants |
|---|---|
PVEAdmin | Everything except some administrative actions |
PVEVMAdmin | VM administration, no cluster admin |
PVEVMUser | View and use own VMs |
PVEAuditor | Read-only access |
PVESysAdmin | Host-level admin (firewall, networking) |
pvesh create /access/acl --path /vms/100 --roles PVEVMUser --users alice@pve
TFA (Two-Factor Authentication)
TFA adds a second factor (TOTP, WebAuthn, recovery key) to authentication.
pvesh create /access/users/{userid}/tfa --type totp --id totp-id
Or via GUI: User → TFA → Add.
API tokens
API tokens allow scripts and tools to authenticate as a user without that user’s password.
pvesh create /access/users/{userid}/token/{tokenid} --privsep 1
Token format: user@realm!tokenid=secret.
Options:
| Option | Purpose |
|---|---|
--privsep 1 | Token has its own ACLs, separate from the user’s. Safer for automation. |
--privsep 0 | Token inherits the user’s full permissions. Risky. |
Production considerations
Common mistakes
- Admin accounts without TFA.
- API tokens with privilege separation disabled.
- Single shared admin account for the team.
Key takeaways
- Use AD/LDAP for humans; reserve local for service accounts.
- RBAC with least privilege.
- TFA mandatory for admins.
- API tokens with privilege separation.
Knowledge check
Knowledge check · 3 questions
Q1. Which option creates an API token that does NOT inherit the user's full permissions?
Q2. Admin accounts may skip TFA for convenience.
Q3. Which auth realm is best for production human accounts?
Passing score: 75%. Answers are checked in this browser.