SQLite module
This module queries an SQLite database for credential validation.
The following environmental variables are required in the execution environment of cvm-sqlite:
The following CREATE TABLE statement is shown as an example for initializing an SQLite database for use with this CVM:
CREATE TABLE accounts ( username TEXT NOT NULL, -- required domain TEXT NOT NULL DEFAULT '', password TEXT NOT NULL, -- required userid TEXT NOT NULL, -- required groupid TEXT NOT NULL, -- required realname TEXT, -- opt directory TEXT NOT NULL, -- required shell TEXT, -- opt groupname TEXT, -- opt sys_username TEXT, -- opt sys_directory TEXT, -- opt mailbox_path TEXT, -- opt UNIQUE (username, domain) );
The following example shows CVM_SQLITE_QUERY defined with a query statement for use with the above schema:
CVM_SQLITE_QUERY=' SELECT -- required: password, username, userid, groupid, directory, -- optional gecos: realname, shell, -- optional other: groupname, domain, sys_username, sys_directory, mailbox_path FROM accounts WHERE username=$account AND domain=$domain '