destr0yr's aslyum http://www.destr0yr.com destr0yr's asylum article feed destr0yr@destr0yr.com destr0yr@destr0yr.com Copyright 2006 destr0yr's aslyum GeekLog Mon, 29 May 2006 10:36:39 -0700 en-gb Exchange 2003: HTTP_500 when running ActiveSync on iPAQ http://www.destr0yr.com/article.php/20060529102040490 http://www.destr0yr.com/article.php/20060529102040490 Mon, 29 May 2006 10:20:40 -0700 http://www.destr0yr.com/article.php/20060529102040490#comments Windows <font face="Verdana">Apparently when upgrading Exchange 2003 to Service Pack 2, your devices may no longer synchronize with ActiveSync as you would expect.&nbsp; Searching through the EventLog directed me to the following Microsoft Knowledge Base Article: <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;817379">http://support.microsoft.com/default.aspx?scid=kb;en-us;817379</a>.&nbsp; Method 2 corrected the issue.</font> <br> cPanel: postmaster, abuse server-wide http://www.destr0yr.com/article.php/cpanel-postmaster-abuse_with-exim http://www.destr0yr.com/article.php/cpanel-postmaster-abuse_with-exim Sun, 14 May 2006 23:26:33 -0700 http://www.destr0yr.com/article.php/cpanel-postmaster-abuse_with-exim#comments cPanel This is actually quite simple, just follow Chirpy's recommendation from the <a href="http://forums.cpanel.net/showpost.php?p=155530&amp;postcount=3">cPanel forums</a>.<br><br> 1. Create a file called /etc/myaliases with:<br> <br> <div style="margin: 5px 20px 20px;"><div style="margin-bottom: 2px;" class="smallfont">Code:</div><pre style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 50px;" class="alt2"><div style="text-align: left;" dir="ltr">postmaster: root<br>abuse: root</div></pre></div><br> 2. In the WHM &gt; Exim Configuration Editor scroll down to the section "DIRECTORS CONFIGURATION" and in the first textbox of that section put:<br> <br> <!--{PS..4}--><div style="margin: 5px 20px 20px;"><div style="margin-bottom: 2px;" class="smallfont">Code:</div><pre style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 146px;" class="alt2"><div style="text-align: left;" dir="ltr">mysystem_aliases:<br> driver = redirect<br> allow_defer<br> allow_fail<br> data = &#36;{lookup{&#36;local_part}lsearch{/etc/myaliases}}<br> file_transport = address_file<br> pipe_transport = address_pipe<br> retry_use_local_part</div></pre></div><br> You'll then have a server-wide postmaster and abuse address that won't be interefered with by users having :fail: Default Addresses.<br> <br> You know you work with computer nerds when... http://www.destr0yr.com/article.php/ComputerNerdAuction http://www.destr0yr.com/article.php/ComputerNerdAuction Mon, 01 May 2006 15:34:02 -0700 http://www.destr0yr.com/article.php/ComputerNerdAuction#comments General News <font face="Verdana">So I come into work today to be greated with an email with the subject "<b>Auction!!!</b>". In the body exists a URL and one-liner that says, "<i>Everybody get your bids in. Anything goes!</i>".<br><br> Here's a screenshot of the website for your enjoyment (MS Painted for security purposes). Also, I've colour coordinated the bidders with my l33t MS-Paint 5k!||z...uhh, anyways, everything was going well until the eventual winning bidder played the ultimate trump card: <a href="http://www.thinkgeek.com/homeoffice/gear/61b7/">a red swingline stapler</a>.</font><br> <br> <a href="http://www.destr0yr.com/images/library/Image/uploads/auction.JPG"><img alt="Auction - red swingline stapler" src="http://www.destr0yr.com/images/library/Image/uploads/auction.JPG" align="middle" border="0" height="170" width="213"></a><br> <font face="Verdana">Here's the Auction Ended email body:</font> <font face="Verdana"><i>I am please to announce the winner of today's auction.<br><br> The slightly used nail clippers go to XXXXXX. His bid of a red Swingline was irresistible.<br><br> I will release the slightly used nail clippers to XXXXXX as soon as he can make his way out of his office in the basement to deliver the stapler to me.</i><br><br> If you don't know the significance of said stapler, please remove your <a href="http://www.geekculture.com/geekculturestore/webstore/caps.html">propeller beanie</a> and toss yourself in the local kiln *. <br><br><i><font size="1">* - DO NOT actually toss yourself into the local kiln. This would be bad. kthnx.</font></i></font> Kernel: 2.6.16 breaks iptables http://www.destr0yr.com/article.php/kernel2.6.16 http://www.destr0yr.com/article.php/kernel2.6.16 Fri, 21 Apr 2006 10:51:14 -0700 http://www.destr0yr.com/article.php/kernel2.6.16#comments Linux <font face="Verdana">The other day I noticed, much to my chagrin, a plethora of invalid user attempts against my SSH server.<br><br>For example:</font><br><br><font face="Courier New">Apr 19 15:30:46 slaxor sshd[13306]: Invalid user station from 161.111.100.200<br>Apr 19 15:30:47 slaxor sshd[13311]: Invalid user play from 161.111.100.200<br>Apr 19 15:30:49 slaxor sshd[13316]: Invalid user open from 161.111.100.200<br>Apr 19 15:30:51 slaxor sshd[13321]: Invalid user dulap from 161.111.100.200<br>Apr 19 15:30:52 slaxor sshd[13326]: Invalid user if from 161.111.100.200<br>Apr 19 15:30:54 slaxor sshd[13331]: Invalid user uk from 161.111.100.200<br>Apr 19 15:30:56 slaxor sshd[13336]: Invalid user us from 161.111.100.200<br>Apr 19 15:30:57 slaxor sshd[13341]: Invalid user alinus from 161.111.100.200<br>Apr 19 15:30:59 slaxor sshd[13346]: Invalid user rumeno from 161.111.100.200<br>Apr 19 15:31:01 slaxor sshd[13351]: Invalid user it from 161.111.100.200</font><br><br><font face="Verdana">I figured I'd check my iptables rules and noticed that something was amuck:</font><br><font color="#000000"><br><code><font face="Courier New"># iptables -nL<br> FATAL: Module ip_tables not found. <br>iptables v1.3.5: can't initialize iptables table `filter': Table does not exist (do you need to insmod?) <br> Perhaps iptables or your kernel needs to be upgraded.<br><br></font></code></font> <font face="Verdana">A trip over the the Gentoo Forums returned the following post: <a href="http://forums.gentoo.org/viewtopic-t-449843-highlight-iptables+gentoosources.html">http://forums.gentoo.org/viewtopic-t-449843-highlight-iptables+gentoosources.html</a>. Edit your /usr/src/linux/.config and replace the current settings with the following:</font><br><br><code># Networking options<br>#<br># CONFIG_NETDEBUG is not set<br>CONFIG_PACKET=y<br># CONFIG_PACKET_MMAP is not set<br>CONFIG_UNIX=y<br>CONFIG_XFRM=y<br># CONFIG_XFRM_USER is not set<br># CONFIG_NET_KEY is not set<br>CONFIG_INET=y<br>CONFIG_IP_MULTICAST=y<br># CONFIG_IP_ADVANCED_ROUTER is not set<br>CONFIG_IP_FIB_HASH=y<br># CONFIG_IP_PNP is not set<br># CONFIG_NET_IPIP is not set<br>CONFIG_NET_IPGRE=y<br># CONFIG_NET_IPGRE_BROADCAST is not set<br># CONFIG_IP_MROUTE is not set<br># CONFIG_ARPD is not set<br># CONFIG_SYN_COOKIES is not set<br># CONFIG_INET_AH is not set<br># CONFIG_INET_ESP is not set<br># CONFIG_INET_IPCOMP is not set<br>CONFIG_INET_TUNNEL=y<br>CONFIG_INET_DIAG=y<br>CONFIG_INET_TCP_DIAG=y<br># CONFIG_TCP_CONG_ADVANCED is not set<br>CONFIG_TCP_CONG_BIC=y<br><br>#<br># IP: Virtual Server Configuration<br>#<br># CONFIG_IP_VS is not set<br># CONFIG_IPV6 is not set<br>CONFIG_NETFILTER=y<br># CONFIG_NETFILTER_DEBUG is not set<br><br>#<br># Core Netfilter Configuration<br>#<br># CONFIG_NETFILTER_NETLINK is not set<br>CONFIG_NETFILTER_XTABLES=m<br>CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m<br>CONFIG_NETFILTER_XT_TARGET_CONNMARK=m<br>CONFIG_NETFILTER_XT_TARGET_MARK=m<br>CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m<br>CONFIG_NETFILTER_XT_TARGET_NOTRACK=m<br>CONFIG_NETFILTER_XT_MATCH_COMMENT=m<br>CONFIG_NETFILTER_XT_MATCH_CONNMARK=m<br>CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m<br>CONFIG_NETFILTER_XT_MATCH_DCCP=m<br>CONFIG_NETFILTER_XT_MATCH_HELPER=m<br>CONFIG_NETFILTER_XT_MATCH_LENGTH=m<br>CONFIG_NETFILTER_XT_MATCH_LIMIT=m<br>CONFIG_NETFILTER_XT_MATCH_MAC=m<br>CONFIG_NETFILTER_XT_MATCH_MARK=m<br>CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m<br>CONFIG_NETFILTER_XT_MATCH_REALM=m<br>CONFIG_NETFILTER_XT_MATCH_SCTP=m<br>CONFIG_NETFILTER_XT_MATCH_STATE=m<br>CONFIG_NETFILTER_XT_MATCH_STRING=m<br>CONFIG_NETFILTER_XT_MATCH_TCPMSS=m<br><br>#<br># IP: Netfilter Configuration<br>#<br>CONFIG_IP_NF_CONNTRACK=m<br># CONFIG_IP_NF_CT_ACCT is not set<br>CONFIG_IP_NF_CONNTRACK_MARK=y<br>CONFIG_IP_NF_CONNTRACK_EVENTS=y<br># CONFIG_IP_NF_CT_PROTO_SCTP is not set<br>CONFIG_IP_NF_FTP=m<br>CONFIG_IP_NF_IRC=m<br># CONFIG_IP_NF_NETBIOS_NS is not set<br># CONFIG_IP_NF_TFTP is not set<br># CONFIG_IP_NF_AMANDA is not set<br># CONFIG_IP_NF_PPTP is not set<br># CONFIG_IP_NF_QUEUE is not set<br>CONFIG_IP_NF_IPTABLES=m<br>CONFIG_IP_NF_MATCH_IPRANGE=m<br>CONFIG_IP_NF_MATCH_MULTIPORT=m<br>CONFIG_IP_NF_MATCH_TOS=m<br>CONFIG_IP_NF_MATCH_RECENT=m<br>CONFIG_IP_NF_MATCH_ECN=m<br>CONFIG_IP_NF_MATCH_DSCP=m<br>CONFIG_IP_NF_MATCH_AH_ESP=m<br>CONFIG_IP_NF_MATCH_TTL=m<br>CONFIG_IP_NF_MATCH_OWNER=m<br>CONFIG_IP_NF_MATCH_ADDRTYPE=m<br>CONFIG_IP_NF_MATCH_HASHLIMIT=m<br>CONFIG_IP_NF_MATCH_POLICY=m<br>CONFIG_IP_NF_FILTER=m<br>CONFIG_IP_NF_TARGET_REJECT=m<br>CONFIG_IP_NF_TARGET_LOG=m<br>CONFIG_IP_NF_TARGET_ULOG=m<br>CONFIG_IP_NF_TARGET_TCPMSS=m<br>CONFIG_IP_NF_NAT=m<br>CONFIG_IP_NF_NAT_NEEDED=y<br>CONFIG_IP_NF_TARGET_MASQUERADE=m<br>CONFIG_IP_NF_TARGET_REDIRECT=m<br>CONFIG_IP_NF_TARGET_NETMAP=m<br>CONFIG_IP_NF_TARGET_SAME=m<br>CONFIG_IP_NF_NAT_SNMP_BASIC=m<br>CONFIG_IP_NF_NAT_IRC=m<br>CONFIG_IP_NF_NAT_FTP=m<br>CONFIG_IP_NF_MANGLE=m<br>CONFIG_IP_NF_TARGET_TOS=m<br>CONFIG_IP_NF_TARGET_ECN=m<br>CONFIG_IP_NF_TARGET_DSCP=m<br>CONFIG_IP_NF_TARGET_TTL=m<br>CONFIG_IP_NF_TARGET_CLUSTERIP=m<br>CONFIG_IP_NF_RAW=m<br>CONFIG_IP_NF_ARPTABLES=m<br>CONFIG_IP_NF_ARPFILTER=m<br>CONFIG_IP_NF_ARP_MANGLE=m</code> MySQL: Data truncated for column 'Password' at row http://www.destr0yr.com/article.php/mysql-data-truncated-password http://www.destr0yr.com/article.php/mysql-data-truncated-password Mon, 10 Apr 2006 14:48:17 -0700 http://www.destr0yr.com/article.php/mysql-data-truncated-password#comments Linux A client had an error which I had not seen. Seems that MySQL had some issues and was truncating the password hash which basically killed the users account. The solution, in this case, was to upgrade from MySQL 4.1.15 to 4.1.18 (<a href="http://bugs.mysql.com/bug.php?id=13064">the bug was resolved in 4.1.16</a>), run mysql with <font face="Courier New">--skip-grant-tables</font> and finally run <font face="Courier New">/usr/bin/mysql_fix_privilege_tables</font>.<br><br>Here's what you may see if you encounter this error:<br><pre class="note">mysql&gt; use `mysql`;<br>mysql&gt; show columns from `user` like 'Password';<br>+----------+-------------+------+-----+---------+-------+<br>| Field | Type | Null | Key | Default | Extra |<br>+----------+-------------+------+-----+---------+-------+<br>| Password | char(16) | | | | |<br>+----------+-------------+------+-----+---------+-------+<br>1 row in set (0.00 sec)<br><br></pre>This was peculiar as another user at the bug listed above had <font face="Courier New">varchar(16)</font> for the Type on the Password field. After running <font face="Courier New">mysql_fix_privilege_tables</font>, it displayed <font face="Courier New">varchar(41)</font>. <br><pre class="note">mysql&gt; update user set password=password('bar') where user='foo';<br>Query OK, 1 row affected, 1 warning (0.00 sec)<br>Rows matched: 1 Changed: 1 Warnings: 1<br><br>mysql&gt; show warnings;<br>+---------+------+-----------------------------------------------+<br>| Level | Code | Message |<br>+---------+------+-----------------------------------------------+<br>| Warning | 1265 | Data truncated for column 'Password' at row 5 |<br>+---------+------+-----------------------------------------------+<br><br>mysql&gt; select user, password from user where user='foo';<br>+------+------------------+<br>| user | password |<br>+------+------------------+<br>| foo | *E8D46CE25265E54 |<br>+------+------------------+<br><br><font face="Verdana">A little more clarification as to what was done to fix this.<br></font></pre><ul> <li><font face="Verdana">Stop MySQL</font></li> <li><font face="Verdana">Upgrade MySQL to 4.1.18, 5.0.16 or better</font></li> <li><font face="Verdana">Run <font face="Courier New">mysqld_safe &amp;</font></font></li> <li><font face="Verdana">Run <font face="Courier New">/usr/bin/mysql_fix_privilege_tables</font></font></li> <li><font face="Verdana">Jump into mysql, simply running <font face="Courier New">mysql </font>should work.</font></li> <li><font face="Verdana">Reset your users password with:</font></li> <ul> <li><font face="Courier New">mysql&gt; use mysql;</font></li> </ul> <ul> <li><font face="Courier New">mysql&gt; update user set password=password('bar') where user='foo';</font></li> </ul> <li><font face="Verdana">If this completes properly, you should receive zero (0) warnings. If you do see a warning, type <font face="Courier New">SHOW WARNINGS; </font>and <a href="http://www.google.com">Google </a>it ;)</font></li> <li><font face="Verdana">Exit mysql and restart it either with <font face="Courier New">service mysqld restart</font> or <font face="Courier New">/etc/init.d/mysql restart</font></font></li></ul> Linux: Single mode password required http://www.destr0yr.com/article.php/Linux-Single-Password-Required http://www.destr0yr.com/article.php/Linux-Single-Password-Required Fri, 07 Apr 2006 13:55:06 -0700 http://www.destr0yr.com/article.php/Linux-Single-Password-Required#comments IT News <font face="Verdana">Occasionally when booting a secured server in single mode, you are prompted to enter the root password or press Control+D to boot into normal mode. This is an issue if the reason you boot into single mode was to reset the root password. One way to get around this is instead of simply typing "<font face="Courier New">single</font>", try "<font face="Courier New">init=/bin/bash single</font>" on the kernel line.<br><br>More info can be found here: <a href="http://linuxpronews.com/2004/0211.html">http://linuxpronews.com/2004/0211.html</a></font> <br> Windows 2003: Security Templates for GPOs http://www.destr0yr.com/article.php/Win2k3SecurityTemplatesforGPOs http://www.destr0yr.com/article.php/Win2k3SecurityTemplatesforGPOs Fri, 07 Apr 2006 12:13:05 -0700 http://www.destr0yr.com/article.php/Win2k3SecurityTemplatesforGPOs#comments Windows <font face="Verdana">The big bad error in my Event Log:<br><br></font> <code> Event Type: Warning<br> Event Source: SceCli<br> Event Category: None<br> Event ID: 1202<br> Date: 4/7/2006<br> Time: 11:49:35 AM<br> User: N/A<br> Computer: AD01<br> Description:<br> Security policies were propagated with warning. 0xd : The data is invalid.<br> <br> Advanced help for this problem is available on http://support.microsoft.com. Query for "troubleshooting 1202 events".<br> <br> For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.<br><br> </code><font face="Verdana"> Searching for "<font face="Courier New">troubleshooting 1202 events</font>" at the Microsoft Knowledge base, along with "<font face="Courier New">the data is invalid</font>" returns one valid article for Windows 2000 - I am using 2003. Anyways, Google found the answer over at <a href="http://forums.asp.net/727214/ShowPost.aspx">http://forums.asp.net/727214/ShowPost.aspx</a>.<br><br> From the article above, and I quote: "To solve this problem I deleted WH-Domain controller GPO, updated DomainControllerV1.inf security template by replacing string '<font face="Courier New">HKEY_LOCAL_MACHINE</font>' with '<font face="Courier New">MACHINE</font>', and recreate WH-Domain controller GPO using updated template."</font> <br> DNS: TXT SPF record with CNAME (with BIND) http://www.destr0yr.com/article.php/DNSTXTSPFrecordwithCNAME http://www.destr0yr.com/article.php/DNSTXTSPFrecordwithCNAME Thu, 06 Apr 2006 08:55:20 -0700 http://www.destr0yr.com/article.php/DNSTXTSPFrecordwithCNAME#comments Linux <font face="Verdana"><a href="http://openspf.org">openspf.org</a> may recommend adding a record such as:<br><br><code>mail.domain.tld. IN TXT "v=spf1 a -all"<br> </code><br> Upon adding the TXT record, you may receive the following errors when running a named-checkzone (our through your control panel, such as WHM/cPanel):<br><br><code># named-checkzone domain.tld /var/named/domain.tld.db<br> dns_master_load: /var/named/domain.tld.db:30: mail.domain.tld: CNAME and other data<br> zone domain.tld/IN: loading master file /var/named/domain.tlddb: CNAME and other data<br> </code><br> The issue is that you cannot mix CNAME (look in your zone file, mail.domain.tld. will be a CNAME) with other records for a name as this is a DNS restriction. The solution is to change mail.domain.tld to an A record (from the CNAME) and disaster <i>should</i> be averted.</font> <br> Gentoo: Re-caching dependency info (mtimes differ) http://www.destr0yr.com/article.php/Re-cachingdependencyinfo http://www.destr0yr.com/article.php/Re-cachingdependencyinfo Thu, 06 Apr 2006 08:32:09 -0700 http://www.destr0yr.com/article.php/Re-cachingdependencyinfo#comments Gentoo <font face="Verdana">After doing an emerge -e world on my system, I restarted and noticed a ton of messages stating, "<font face="Courier New">Re-caching dependency info (mtimes differ)...</font>".<br><br>For example:<br><br><code>/etc/init.d/hdparm restart<br>* Re-caching dependency info (mtimes differ)...<br>* Re-caching dependency info (mtimes differ)...<br>* Re-caching dependency info (mtimes differ)...<br>* Re-caching dependency info (mtimes differ)...<br>* Re-caching dependency info (mtimes differ)... <br><br></code>The following solution from the <a href="http://forums.gentoo.org/viewtopic-p-3209760.html#3209760">Gentoo Forums</a> worked for me:<br><br><code>touch /etc/init.d/*; /sbin/depscan.sh --update</code></font> <br> Fedora/RedHat: &quot;rpm&quot; locks up http://www.destr0yr.com/article.php/fedora-redhat_rpm-lockup http://www.destr0yr.com/article.php/fedora-redhat_rpm-lockup Wed, 22 Mar 2006 10:02:07 -0800 http://www.destr0yr.com/article.php/fedora-redhat_rpm-lockup#comments Linux <font face="Verdana">The the longest time I've always wondered why the hell one of the systems at work would continuously lockup on the RPM command. It was really a pain in the ass as their was a cronjob that would run the following command daily without ever completing, leaving an infinate number of processes open that just sat there:<br><br><font face="Courier New">rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}.rpmn' 2&gt;&amp;1 <br> | sort &gt; /var/log/rpmpkgs</font><br><br>The fix, which Google helped me find, is here: <a href="http://voidmain.is-a-geek.net/redhat/fedora_1_rpm_lockup_bug_workaround.html">http://voidmain.is-a-geek.net/redhat/fedora_1_rpm_lockup_bug_workaround.html</a><br><br>/me brings out the l33t c0py/p4&#36;t3 5k!||z<br></font> <font color="#000000" face="Verdana, Geneva, Arial, Helvetica, Sans-Serif" size="1"><b><font color="blue">Let us begin</font></b>:<br><br><b>&#36; su -<br></b>(enter root's password)<br><b># killall -9 rpm<br># rm /var/lib/rpm/__*<br></b><br>That is two underscore "<b>_</b>" characters before the "<b>*</b>" in the above command. You should be prompted if you want to delete the following files:<br><br><b>/var/lib/rpm/__db.001<br>/var/lib/rpm/__db.002<br>/var/lib/rpm/__db.003<br></b><br><br>Answer "<b>y</b>" to each of those files. Now you should be able to again install/remove packages with the "<b>rpm</b>" command. Try and install or remove the same package that caused it to hang up and you will likely find that it now works.<br><br><b><font color="blue">Further Reading</font></b>:<br><a href="http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=63342">Specific problem in Bugzilla</a><br><a href="http://bugzilla.redhat.com/bugzilla/">Red Hat Bugzilla</a></font><br>