CREATE VIEW `nss_getpwnam` AS select distinct lcase(`n`.`title`) AS `username`,'x' AS `password`,10000 AS `uid`,10000 AS `gid`,concat(`nc`.`title`,',,,') AS `gecos`,concat_ws('/',`p`.`publish_path`,'sites',`n`.`title`) AS `homedir`,if((`s`.`status` = 1),'/bin/true','/bin/false') AS `shell` from (((((`hosting_site` `s` left join `node` `n` on((`s`.`vid` = `n`.`vid`))) left join `hosting_client_user` `c` on(((`s`.`client` = `c`.`client`) and (`c`.`user` <> 1)))) left join `node` `nc` on((`nc`.`nid` = `s`.`client`))) left join `users` `u` on(((`u`.`uid` = `c`.`user`) and (`u`.`status` <> 0)))) left join `hosting_platform` `p` on((`s`.`platform` = `p`.`nid`))); CREATE VIEW `nss_getspnam` AS select distinct `n`.`title` AS `username`,if((`s`.`status` = 1),`u`.`pass`,'*') AS `password`,1 AS `lstchg`,0 AS `min`,99999 AS `max`,0 AS `warn`,0 AS `inact`,if((`s`.`status` <> 1),0,-(1)) AS `expire`,0 AS `flag` from (((`hosting_site` `s` left join `node` `n` on((`s`.`vid` = `n`.`vid`))) left join `hosting_client_user` `c` on(((`s`.`client` = `c`.`client`) and (`c`.`user` <> 1)))) left join `users` `u` on(((`u`.`uid` = `c`.`user`) and (`u`.`status` <> 0)))); CREATE VIEW `nss_getgrnam` AS select 'aegir' AS `group`,'x' AS `password`,10000 AS `gid`; CREATE VIEW `nss_gidsbymem` AS select 10000 AS `gid`; CREATE VIEW `nss_mysql` AS select distinct `n`.`title` AS `username`,if((`s`.`status` = 1),`u`.`pass`,'*') AS `password`,`s`.`status` AS `status` from ((((`hosting_site` `s` left join `node` `n` on((`s`.`vid` = `n`.`vid`))) left join `hosting_client` `c` on((`s`.`client` = `c`.`nid`))) left join `hosting_client_user` `cu` on(((`s`.`client` = `cu`.`client`) and (`cu`.`user` <> 1)))) left join `users` `u` on(((`u`.`uid` = `cu`.`user`) and (`u`.`status` <> 0))));