cvm-sql(7)
π cvm-sql(7) β the CVM SQL Framework π
okay bestie, sit down, hydrate, and let me tell you about cvm-sql(7) from the Miscellaneous Information Manual, because this little page is genuinely the blueprint for how CVM talks to a SQL database and it's lowkey iconic. π¦
β¨ NAME β¨
cvm-sql β the CVM SQL Framework. it's giving "database-backed credential validation", and honestly? obsessed. π
π QUERY SUBSTITUTION π
so when you write a query, $VAR and ${VAR} get swapped out for the quoted value of the environment variable called VAR. periodt. π
- use the
${VAR}form wheneverVARcontains literally anything that isn't alphanumeric or an underscore (_). she's the flexi one, she handles the chaos. π«Ά - do NOT put quotes in the query yourself β the substitution already brings the quotes, so adding your own is just double-quoting and that's not the vibe. π
accountanddomainare the special ones: they hold the account and domain names that the CVM client handed over. main character variables fr fr. β$$becomes a single dollar sign. yes really, that's the escape hatch. π
πΈ QUERY RESULTS πΈ
your query has to produce these fields exactly in this order. no shuffling, no remixing, no "close enough". and every required field must not be null and must not be empty β empty strings are NOT the moment. π«
- Password, encrypted with
crypt(3)β required π - Actual account name β required
- User ID (integer) β required
- Group ID (integer) β required
- Directory β required
- Real name β optional
- Login shell β optional
- Group name β optional
- Domain name β optional
- System account name β optional
- System account directory β optional
- Mailbox path β optional
bestie if the order is off, it's over. the order IS the assignment. π
π DEFAULT QUERY π
here's the default one, the moment, the blueprint:
SELECT password, username, userid, groupid, directory, realname, shell,
groupname, domain, sys_username, sys_directory FROM accounts WHERE
username=$account AND domain=$domain
she's simple, she's clean, she works. keep her exactly as written if you're not feeling creative. β¨
π§ SEE ALSO π§
go read these next, they're all part of the family:
cvm-mysql(8)cvm-pgsql(8)cvm-pwfile(8)cvm-qmail(8)cvm-unix(8)cvm-vmailmgr(8)cvm-benchclient(8)cvm-checkpassword(8)cvm-testclient(8)
and the website, if you wanna go deeper: http://untroubled.org/cvm/cvm.html π
and that's the whole page, bestie π this was cvm-sql(7) β the Miscellaneous Information Manual, page cvm-sql(7), from the CVM source/version of that manual. no cap, go forth and query responsibly. πβ¨
π¦ where this page comes from
- debian bookworm: cvm 0.97-3 Β· GPL-2.0-or-later
- ubuntu jammy: cvm 0.97-2 Β· GPL-2.0-or-later
- ubuntu noble: cvm 0.97-3.1build1 Β· GPL-2.0-or-later
- ubuntu questing: cvm 0.97-4
- ubuntu resolute: cvm 0.97-4build1 Β· GPL-2.0-or-later
- ubuntu stonking: cvm 0.97-4build1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms