Chris@0: /* ssh views */ Chris@0: Chris@0: CREATE OR REPLACE VIEW ssh_users as Chris@0: select login as username, hashed_password as password Chris@0: from users Chris@0: where status = 1; Chris@0: Chris@0: Chris@0: /* nss views */ Chris@0: Chris@0: CREATE OR REPLACE VIEW nss_groups AS Chris@0: select identifier AS name, (id + 5000) AS gid, 'x' AS password Chris@0: from projects; Chris@0: Chris@0: CREATE OR REPLACE VIEW nss_users AS Chris@0: select login AS username, CONCAT_WS(' ', firstname, lastname) as realname, (id + 5000) AS uid, 'x' AS password Chris@0: from users Chris@0: where status = 1; Chris@0: Chris@0: CREATE OR REPLACE VIEW nss_grouplist AS Chris@0: select (members.project_id + 5000) AS gid, users.login AS username Chris@0: from users, members Chris@0: where users.id = members.user_id Chris@0: and users.status = 1;