---
name: "cvm-sql"
section: "7"
platform: "linux"
package: "cvm"
version: "0.97-3"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/cvm-sql"
---

# cvm-sql(7)

CVM SQL Framework

## NAME

cvm-sql - CVM SQL Framework

## QUERY SUBSTITUTION

*$VAR* and *${VAR}* are replaced with the **quoted** value of the environment variable named *VAR*. Use the second form when *VAR* contains anything other than alpha-numeric or underscore (\_) characters. Do not include quotes in the query. The variables *account* and *domain* contain the account and domain names given by the CVM client. *$$* is replaced with a single dollar sign.

## QUERY RESULTS

The query must produce the following fields exactly in order. All required fields must not be null or empty.

- 1\.

  Password, encrypted with [**crypt**(3)](/crypt/3.md) (required)

- 2\.

  Actual account name (required)

- 3\.

  User ID (integer) (required)

- 4\.

  Group ID (integer) (required)

- 5\.

  Directory (required)

- 6\.

  Real name (optional)

- 7\.

  Login shell (optional)

- 8\.

  Group name (optional)

- 9\.

  Domain name (optional)

- 10\.

  System account name (optional)

- 11\.

  System account directory (optional)

- 12\.

  Mailbox path (optional)

## DEFAULT QUERY

SELECT password, username, userid, groupid, directory, realname, shell, groupname, domain, sys\_username, sys\_directory FROM accounts WHERE username=$account AND domain=$domain

## SEE ALSO

[cvm-mysql(8)](/cvm-mysql/8.md), [cvm-pgsql(8)](/cvm-pgsql/8.md), [cvm-pwfile(8)](/cvm-pwfile/8.md), [cvm-qmail(8)](/cvm-qmail/8.md), [cvm-unix(8)](/cvm-unix/8.md), [cvm-vmailmgr(8)](/cvm-vmailmgr/8.md), [cvm-benchclient(8)](/cvm-benchclient/8.md), [cvm-checkpassword(8)](/cvm-checkpassword/8.md), [cvm-testclient(8)](/cvm-testclient/8.md)

 http://untroubled.org/cvm/cvm.html
