DeutschEspañolFrançaisItalianoNederlandsPortuguêsΕλληνικάРусскийالعربية中文(简体)中文(繁體)日本語한국어
 
Donate any amount via Amazon.com Honor System - fully refundable for 7 days.
Google
 
www smithii.com
 

ross's blog

Dumping the GRANT statements in MySQL

The following script will display your GRANT statements in MySQL in *nix:

$ mysql -e "SELECT CONCAT('SHOW GRANTS FOR ',QUOTE(user),'@',QUOTE(host),';') FROM mysql.user" --column-names=false -B | 
mysql --column-names=false -B 2>/dev/null |
sed 's/$/;/'

Here's a sample output:

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'
IDENTIFIED BY PASSWORD '*FD1111DEADBEEFDEADBEEFDEADBEEFDEADBEEFDE'
WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' 
IDENTIFIED BY PASSWORD '*FD1111DEADBEEFDEADBEEFDEADBEEFDEADBEEFDE'
WITH GRANT OPTION;

On Windows, replace /dev/null with NUL, and remove the sed command:

c:> mysql -e "SELECT CONCAT('SHOW GRANTS FOR ',QUOTE(user),'@',QUOTE(host),';')
FROM mysql.user" --column-names=false -B | mysql --column-names=false -B 2>nul

You will then need to add the ; character manually.

You could even do this from inside the mysql client, in *nix:

$ mysql
mysql> SELECT CONCAT('SHOW GRANTS FOR ',QUOTE(user),'@',QUOTE(host),';')
FROM mysql.user INTO OUTFILE '/tmp/grants.sql';
mysql> source /tmp/grants.sql

and in Windows:

C:> mysql
mysql> SELECT CONCAT('SHOW GRANTS FOR ',QUOTE(user),'@',QUOTE(host),';')
FROM mysql.user INTO OUTFILE 'c:/grants.sql';
mysql> source c:/grants.sql

If you get an error message, try your %TEMP% directory:

C:> cd /d "%TEMP%"
C:> dir /x ..
Volume in drive C is volname
Volume Serial Number is FEED-FACE

Directory of C:\DOCUME~1\ross\LOCALS~1

01/23/2008  11:09 AM    <DIR>                       Apps
08/07/2008  03:10 PM    <DIR>                       Temp
               0 File(s)              0 bytes
               2 Dir(s)   6,727,245,824 bytes free
c:> mysql
mysql> SELECT CONCAT('SHOW GRANTS FOR ',QUOTE(user),'@',QUOTE(host),';')

Mediawiki's Openness Is Not a Good Thing Anymore

Spammers found my MediaWiki based website, and flooded the site with over 1.2GB of link spam. To fix this, I locked down my site, so only sysops can change it, by adding the following to the end of my LocalSettings.php file:

// Implicit group for all visitors
$wgGroupPermissions['*'    ]['createaccount']   = true;
$wgGroupPermissions['*'    ]['read']            = true;
$wgGroupPermissions['*'    ]['edit']            = false;
$wgGroupPermissions['*'    ]['createpage']      = false;
$wgGroupPermissions['*'    ]['createtalk']      = false;

// Implicit group for all logged-in accounts
$wgGroupPermissions['user' ]['move']            = false;
$wgGroupPermissions['user' ]['read']            = true;
$wgGroupPermissions['user' ]['edit']            = false;
$wgGroupPermissions['user' ]['createpage']      = false;
$wgGroupPermissions['user' ]['createtalk']      = false;
$wgGroupPermissions['user' ]['upload']          = false;
$wgGroupPermissions['user' ]['reupload']        = false;
$wgGroupPermissions['user' ]['reupload-shared'] = false;
$wgGroupPermissions['user' ]['minoredit']       = false;

// Implicit group for accounts that pass $wgAutoConfirmAge
$wgGroupPermissions['autoconfirmed']['autoconfirmed'] = true;

// Implicit group for accounts with confirmed email addresses
// This has little use when email address confirmation is off
$wgGroupPermissions['emailconfirmed']['emailconfirmed'] = true;

// Users with bot privilege can have their edits hidden
// from various log pages by default
$wgGroupPermissions['bot'  ]['bot']             = true;
$wgGroupPermissions['bot'  ]['autoconfirmed']   = true;
$wgGroupPermissions['bot'  ]['nominornewtalk']  = true;

// Most extra permission abilities go to this group

$wgGroupPermissions['sysop' ]['move']            = true;
$wgGroupPermissions['sysop' ]['edit']            = true;
$wgGroupPermissions['sysop' ]['createpage']      = true;

nirsoft_installer 1.21 has been released (announcement)

Details at http://smithii.com/nirsoft_installer.

This seemingly duplicate entry has been created as some RSS readers, such as Google Reader, do not display updates to existing blog entries, even if the update date was changed. This entry will be deleted in a week or so. Therefore, please do not post comments to this entry. Post them to the above URL instead. Thanks!

nirsoft_installer 1.21 has been released (14-Jul-08)

nirsoft_installer is an NSIS installer I whipped up to download and install most of the wonderful utilities found at http://nirsoft.net.

You can download the binary here and the binary with the source code here.

aria2 0.13.2+1 for Windows has been released (updated 07-Jun-08)

aria2 is a download utility with resuming and segmented downloading.

Using the makefile aria2.mak.

I successfully ported aria2 to Windows using the Debian MinGW cross-compiler. While aria2 compiles under native MinGW and Cygwin, the resultant executable is buggy, and numerous unit tests fail.

Update: I installed gcc 4.3.0 in MinGW using get_mingw.cmd and am now able to produce working binaries in my Windows environment. This leads me to believe that gcc 3.4.5 is not reliable under MinGW.

Version 0.13.2+1

Please see the README file here.
The binary is available on SourceForge.net and here.

Version 0.13.0

Please see the README file here.
The binary is available on SourceForge.net and here.

Version 0.12.0

Please see the README file here.
The binary is available on SourceForge.net and here.

Version 0.11.5

Please see the README file here.
The binary is available on SourceForge.net and here.

Version 0.11.4

Please see the README file here.
The binary is available on SourceForge.net and here.

Version 0.11.3-1

Please see the README file here.
The binary is available on SourceForge.net
and here.

Version 0.11.3

Please see the README file here.
The binary is available on SourceForge.net and here.

Version 0.11.2

Please see the README file here.
The binary is available here. Update: this release fixes the torrent download issue with the original 0.11.2 MinGW release.

Version 0.11.1+1

The binary is available here.

Version 0.11.0

The binary is available here.

Version 0.10.2+1

The binary is available here.

Please note that while the developer states in the README file: "aria2 is in very early development stage", I've successfully downloaded using the following methods:

  • HTTPS
  • HTTP
  • FTP
  • Local metalinks
  • Remote metalinks
  • Local torrents
  • Remote torrents

I'm aware of the following issues:

  • Azureus is much faster than aria2 on my system. Initially, I thought this was due to my firewall blocking incoming UDP traffic. As aria2 only uses TCP and not UDP sockets, this does not appear to be the reason why Azureus is faster. More research is needed.

  • I wasn't able to directly download the metalink http://curl.haxx.se/metalink.cgi?curl=tar.gz. A workaround would be:
    aria2c.exe -o local.metalink --follow-metalink=false http://curl.haxx.se/metalink.cgi?curl=tar.gz
    aria2c.exe -M local.metalink
    

The following issues have been fixed:

  • Rename bug due to MinGW's rename() not deleting the destination file, if it already exists.
  • HTTPS downloads failed prior to version 0.11.1+1.
  • Downloads failed at 2GB prior to version 0.11.1+1.
  • Due to MinGW's sscanf() function lacking support for the %Ld specifier, files larger than 2147483648 bytes will not download correctly via FTP. This is not an issue for the Cygwin version.

Here's the included README-win32.txt file:

aria2 0.13.2+1 for Windows has been released (annoucement)

Details at http://smithii.com/aria2.

This seemingly duplicate entry has been created as some RSS readers, such as Google Reader, do not display updates to existing blog entries, even if the creation date of the entry was updated. This entry will be deleted in a week or so. Therefore, please do not post comments to this entry. Post them to the above URL instead. Thanks!

php_installer 1.12 (for PHP 5.2.6) has been released (06-Jun-08)

php_installer is an NSIS installer I whipped up to download and install PHP 5.2.6, PECL, the PHP CHM manual, and the Zend Optimizer found at http://www.php.net.

You can download the binary here and the binary with the source code here.

Here's the changelog.txt:

php_installer 1.12 (for PHP 5.2.6) has been released (annoucement)

Details at http://smithii.com/php_installer.

This seemingly duplicate entry has been created as some RSS readers, such as Google Reader, do not display updates to existing blog entries, even if the update date was changed. This entry will be deleted in a week or so. Therefore, please do not post comments to this entry. Post them to the above URL instead. Thanks!

Automatically Slipstream Windows XP with SP2 and All Post-SP2 Security Hotfixes with a Single Command (announcement)

Details at http://smithii.com/slipstream_xpsp2.

This seemingly duplicate blog entry has been created as some RSS readers, such as Google Reader, do not display updates to existing entries, even if the creation date of the entry was updated. This entry will be deleted in a week or so. Therefore, please do not post comments to this entry. Post them to the above URL instead. Thanks!

Automatically Slipstream Windows XP with SP2 and All Post-SP2 Security Hotfixes with a Single Command (Updated 23-Apr-08)

I've written the batch file xpsp2.cmd (updated 23-Apr-08) to automatically download and slipstream a standard Windows XP boot disk with Service Pack 2 and all post-SP2 security hotfixes.

It uses wget or curl (if either are found in the PATH), or your installed browser to download the updates. I have tested this with Internet Explorer, Firefox, and Opera. Other browsers should work, as well.

The batch file xpsp2local.cmd (updated 23-Apr-08) will update the copy of Windows XP that is installed on the computer you run the command on. You may wish to do this, if you do not have, or want, the machine you want to hotfix connected to the internet, or if you are unable to run Windows Update for some reason (for example, if Internet Explorer isn't installed, or doesn't work properly, due to a virus or similar mishap).

To slipstream the hotfixes, and burn the slipstreamed disk, I've created the makefile xpsp2.mak (updated 23-Apr-08). Details on usage below.

si_installer 1.9 has been released (01-Mar-08)

si_installer is an NSIS installer I whipped up to download and install most of the wonderful utilities found at http://sysinternals.com.

You can download the binary here and the binary with the source code here.

Here's the changelog.txt:

php4_installer 1.5 (for PHP 4.4.8) has been released (23-Jan-08)

php4_installer is an NSIS installer I whipped up to download and install PHP 4.4.8, and the PHP CHM manual found at http://www.php.net.

You can download the binary here and the binary with the source code here.

QuickBooks 2008 doesn't import Bank of America transactions

I'm able to use QuickBooks Pro 2008 to import transactions from other banks, using the WebConnect interface, just fine, but when I try to download Bank of America transactions, QB Pro 2008 reports that it downloaded the transactions successfully, but then the bank does not appear on the Online Banking Center page.

I've talked with 4 different people at Intuit, and none were aware of the issue. The last said I needed a security patch installed, and sent me this link:

http://support.quickbooks.intuit.com/support/qbupdate2008/default.aspx

which is not a valid page.

I called Bank of America, and they said it's been a known issue since QuickBooks 2008 was released back in October of 2007, and that Intuit has been working on a solution since then.

She said Intuit has been emailing patches to users, but when I called Intuit and mentioned this, they gave me the above broken link.

The BofA person mentioned downgrading the 2007, but the Intuit person said 2007 will not read a file created in 2008.

I'm ready to return the product, but I really would like to exhaust all avenues before doing that.

I'm gonna try installing QuickBooks on a pristine Windows XP SP2, inside VMWare, and see if that fixes my issue. <sigh>

Here are two threads mentioning this issue:

http://quickbooksgroup.com/webx/forums/Online%20Services/Online%20Banking/108/5?50
http://quickbooksgroup.com/webx/forums/Online%20Services/Online%20Banking/342?14

Error 0x715 slipstreaming KB994653

After downloading KB944653: MS07-067: Vulnerability in Macrovision Driver Could Allow Local Elevation of Privilege and running

WindowsXP-KB944653-x86-ENU.exe /integrate:d:\X1APCCP_EN\X1APCCP_EN

a popup window happily reports

Integrated install has completed successfully.

But all is not well in Microsoftland. Microsoft Baseline Security Analyzer 2.01 reports KB944653 still needs to be installed.

So I ran

WindowsXP-KB944653-x86-ENU.exe /integrate:d:\X1APCCP_EN\X1APCCP_EN /log:d:\kb994653.log

again, and the log reports:

[kb994653.log]
0.000: ================================================================================
0.000: 2007/12/31 08:49:41.215 (local)
0.016: f:\1cf1bc70d3a240a6270ba4ba9d\update\update.exe (version 6.2.29.0)
0.016: Slipstream mode
0.032: Service Pack started with following command line: /integrate:d:\X1APCCP_EN\X1APCCP_EN /log:d:\kb994653.log
0.047: Package Type:  BRANCHING
1.641: GetFileListInformation:  Error 0x715 retrieving version information about d:\X1APCCP_EN\X1APCCP_EN\I386\secdrv.sys
1.641: IntegrateHotfix:  Error 0x0 while trying to retrive information about hotfix files.
3.157: Message displayed to the user: Integrated install has completed successfully.
3.157: User Input: OK
3.157: Integrated install has completed successfully.

Uh oh, "Error 0x715" and, even better, "Error 0x0 while trying to retrive" (sic).

It seems I386\SECDRV.SY_ on every CD of Windows XP Professional I own, does not have any versioning information in the file. Here are the details:

SECDRV.SY_, 7,261 bytes, dated 8-04-2004 4:00:00, which expands to
secdrv.sys, 27,440 bytes, dated 7-17-2004 11:36:38.

php_installer 1.11 (for PHP 5.2.5) has been released (annoucement)

Details at http://smithii.com/php_installer.

This seemingly duplicate entry has been created as some RSS readers, such as Google Reader, do not display updates to existing blog entries, even if the update date was changed. This entry will be deleted in a week or so. Therefore, please do not post comments to this entry. Post them to the above URL instead. Thanks!

Syndicate content
DeutschEspañolFrançaisItalianoNederlandsPortuguêsΕλληνικάРусскийالعربية中文(简体)中文(繁體)日本語한국어
 
Donate any amount via Amazon.com Honor System - fully refundable for 7 days.
Google
 
www smithii.com