{"id":86,"date":"2010-11-11T00:51:51","date_gmt":"2010-11-11T03:51:51","guid":{"rendered":"http:\/\/blog.digavoip.com.br\/2010\/11\/11\/exemplo-pam-com-mysql-para-squid\/"},"modified":"2010-11-11T00:51:51","modified_gmt":"2010-11-11T03:51:51","slug":"exemplo-pam-com-mysql-para-squid","status":"publish","type":"post","link":"https:\/\/blog.abratel.com.br\/?p=86","title":{"rendered":"Exemplo PAM com mysql para squid"},"content":{"rendered":"<p>Instalar o modulo:<br \/>\napt-get install libpam-mysql<\/p>\n<p>ap\u00f3s editar vim \/etc\/pam.d\/squid<br \/>\nE incluir<br \/>\n#%PAM-1.0<br \/>\nauth sufficient \/lib\/security\/pam_mysql.so user=root passwd=senhamysql host=localhost db=squid table=squidauth usercolumn=username passwdcolumn=password crypt=0 sqllog=0<br \/>\naccount required \/lib\/security\/pam_mysql.so user=root passwd=senhamysql host=localhost db=squid table=squidauth usercolumn=username passwdcolumn=password crypt=0 sqllog=0<\/p>\n<p>Ap\u00f3s criar a tabela squid no mysql (create table squid) e incluir:<\/p>\n<p>SET SQL_MODE=&#8221;NO_AUTO_VALUE_ON_ZERO&#8221;;<br \/>\nCREATE TABLE IF NOT EXISTS `squidauth` (<br \/>\n  `username` varchar(255) NOT NULL default &#8221;,<br \/>\n  `password` varchar(255) NOT NULL default &#8221;,<br \/>\n  `name` varchar(255) NOT NULL default &#8221;,<br \/>\n  `created` datetime NOT NULL default &#8216;0000-00-00 00:00:00&#8217;,<br \/>\n  `modified` datetime NOT NULL default &#8216;0000-00-00 00:00:00&#8217;,<br \/>\n  `active` tinyint(1) NOT NULL default &#8216;1&#8217;,<br \/>\n  PRIMARY KEY  (`username`),<br \/>\n  KEY `username` (`username`)<br \/>\n) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=&#8217;Virtual Mailboxes&#8217;;<br \/>\nINSERT INTO `squidauth` (`username`, `password`, `name`, `created`, `modified`, `active`) VALUES<br \/>\n(&#8216;ulisses&#8217;, &#8216;123345&#8217;, &#8216;ulisses&#8217;, &#8216;0000-00-00 00:00:00&#8217;, &#8216;0000-00-00 00:00:00&#8217;, 1);<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Instalar o modulo: apt-get install libpam-mysql ap\u00f3s editar vim \/etc\/pam.d\/squid E incluir #%PAM-1.0 auth sufficient \/lib\/security\/pam_mysql.so user=root passwd=senhamysql host=localhost db=squid table=squidauth usercolumn=username passwdcolumn=password crypt=0 sqllog=0 account required \/lib\/security\/pam_mysql.so user=root passwd=senhamysql host=localhost db=squid table=squidauth usercolumn=username passwdcolumn=password crypt=0 sqllog=0 Ap\u00f3s criar a tabela squid no mysql (create&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=\/wp\/v2\/posts\/86"}],"collection":[{"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=86"}],"version-history":[{"count":0,"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=\/wp\/v2\/posts\/86\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=86"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=86"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=86"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}