<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MySQL Preacher &#187; authentication</title>
	<atom:link href="http://mysqlpreacher.com/wordpress/tag/authentication/feed/" rel="self" type="application/rss+xml" />
	<link>http://mysqlpreacher.com/wordpress</link>
	<description>Because Sharing is Caring</description>
	<lastBuildDate>Sat, 14 Apr 2012 17:45:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Recovering a MySQL `root` password &#8211; Three solutions</title>
		<link>http://mysqlpreacher.com/wordpress/2011/03/recovering-a-mysql-root-password-three-solutions/</link>
		<comments>http://mysqlpreacher.com/wordpress/2011/03/recovering-a-mysql-root-password-three-solutions/#comments</comments>
		<pubDate>Mon, 21 Mar 2011 19:00:58 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac OS]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[grants]]></category>
		<category><![CDATA[pass]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[skip-grant-tables]]></category>
		<category><![CDATA[user]]></category>
		<category><![CDATA[user.myd]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=657</guid>
		<description><![CDATA[Three ways to recover a root user password: The order of solutions here under gets more creative on the way down :) 1. obviously, before starting messing around check my.cnf or scripts for passwords entries, then try home directories for password files 2. secondly &#8211; can you restart mysql? if yes, restart with &#8211;skip-grant-tables, log [...]]]></description>
			<content:encoded><![CDATA[<p>Three ways to recover a root user password:</p>
<p>The order of solutions here under gets more creative on the way down :)</p>
<p>1. obviously, before starting messing around check my.cnf or scripts for passwords entries, then try home directories for password files<br />
2. secondly &#8211; can you restart mysql? if yes, restart with &#8211;skip-grant-tables, log into mysql, change your password and restart without &#8211;skip-grant-tables<br />
3. third option &#8211; (on linux / unix ONLY)<br />
If you haven’t found the password anywhere and can&#8217;t afford to restart your mysql.</p>
<pre class="brush:shell">cd data/mysql
cp -rp user.MYD bck_user.MYD_`date +%Y%m%d`
cp -rp user.MYD /tmp/user.MYD
vi /tmp/user.MYD #(edit the hashed passwords next to root*)
cp -rp /tmp/user.MYD user.MYD
sudo kill -HUP `pidof mysqld`</pre>
<p>Note that the latter method of recovering a root password CAN be easily used maliciously leaving no trace! The only way to avoid such an attack is to make the data directory ONLY readable and writable by the user used to start/stop mysql (don&#8217;t user *nix root user to own mysql since that opens another can of worms &#8230; it&#8217;s a whole other blog post).</p>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2011/03/recovering-a-mysql-root-password-three-solutions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MySQL anonymous accounts &#8211; User=&#8221;, Host=&#8217;%&#8217; &#8211; CODE RED</title>
		<link>http://mysqlpreacher.com/wordpress/2009/10/mysql-anonymous-accounts-user-host-code-red/</link>
		<comments>http://mysqlpreacher.com/wordpress/2009/10/mysql-anonymous-accounts-user-host-code-red/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 13:50:30 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[Beginner]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[%]]></category>
		<category><![CDATA[accounts]]></category>
		<category><![CDATA[anonymous]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[threat]]></category>
		<category><![CDATA[usernames]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=297</guid>
		<description><![CDATA[I want to highlight the importance of reviewing mysql&#8217;s initial set of accounts. Say you have a mysql on abc.def.ghi.jkl running on port 3306 anonymous account with privileges without a password, then: 1. mysql (if issued on localhost) 2. mysql -h abc.def.ghi.jkl 3. mysql -u &#8221; -h abc.def.ghi.jkl 4. mysql -u &#8221; -h abc.def.ghi.jkl -P [...]]]></description>
			<content:encoded><![CDATA[<p>I want to highlight the importance of reviewing mysql&#8217;s initial set of accounts.<br />
Say you have a mysql on abc.def.ghi.jkl running on port 3306 anonymous account with privileges without a password, then:<br />
1. mysql (if issued on localhost)<br />
2. mysql -h abc.def.ghi.jkl<br />
3. mysql -u &#8221; -h abc.def.ghi.jkl<br />
4. mysql -u &#8221; -h abc.def.ghi.jkl -P 3306<br />
5. mysql -u user_which_does_not_exist -h abc.def.ghi.jkl</p>
<p>will all manage to get into mysql given the way mysql authenticates users is against your username and client host from where you are connecting.</p>
<p>This verification is done versus the following columns in the mysql.user table, i.e., User,Host and Password columns.<br />
An entry in the mysql.user table with the following values User=&#8221;, Host=&#8217;%&#8217; will accept ANY user connecting from ANYWHERE in the world, thus disabling ANY security. Hence the reason for this blog post highlighting the importance of dropping such accounts, at least in all environments apart from dev.</p>
<p>Further information at:</p>
<p>http://dev.mysql.com/doc/refman/5.1/en/connection-access.html</p>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2009/10/mysql-anonymous-accounts-user-host-code-red/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

