<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rss [<!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">]>
<rss version="0.92" xml:base="http://www.ctunion.com">
<channel>
 <title>Computer Tech Union - Debian Support</title>
 <link>http://www.ctunion.com/taxonomy/term/19/0</link>
 <description>Get and give help on Debian issues</description>
 <language>en</language>
<item>
 <title>Linux password recovery</title>
 <link>http://www.ctunion.com/node/796</link>
 <description>&lt;p&gt;So you forgot your root password...no worries as long as you have physical access to the machine.&lt;br /&gt;
Some distributions (Fedora, CentOS, for example) make it super easy to recover the root password by using single user mode.  All you have to do is edit the boot line in grub and append the word single to the end of the line.  Once it boots, you are root (without having to log in) and can issue the "passwd" command to change the password.  Reboot, and viola!, password changed.&lt;/p&gt;
&lt;p&gt;Other distributions (debian, Ubuntu, and other derivatives for example) make it more difficult.  The quickest easiest way I have found to reset these is from a live cd.  Live cd's basically let you boot from a cd into a fully working OS.  There are many different ones out there such as &lt;a href="http://www.knoppix.net"&gt;Knoppix&lt;/a&gt; and &lt;a href="http://www.ubuntu.com"&gt;Ubuntu&lt;/a&gt;.&lt;/p&gt;
</description>
 <pubDate>Wed, 03 Feb 2010 11:13:40 -0800</pubDate>
</item>
<item>
 <title>configuring htaccess restrictions on debian apache2 server</title>
 <link>http://www.ctunion.com/node/706</link>
 <description>&lt;p&gt;This is a quick guide on how to set up htaccess restrictions on a directory located on a server running apache2 with a debian OS.&lt;/p&gt;
&lt;p&gt;First, you will need to update the httpd.conf file, which should be located in the apache2 directory, as follows:&lt;/p&gt;
&lt;p&gt;&amp;amp;#60Directory (directory to be protected)&amp;amp;#62&lt;br /&gt;
Options Indexes Includes FollowSymLinks Multivews&lt;br /&gt;
AllowOverride AuthConfig&lt;br /&gt;
Order allow,deny&lt;br /&gt;
Allow from all&lt;br /&gt;
&amp;amp;#60/Directory&amp;amp;#62&lt;/p&gt;
&lt;p&gt;Make sure to take out the "" they are only included so this post displays properly.&lt;/p&gt;
&lt;p&gt;Once this update is saved, restart the apache2 server with the following command, or something like it depending on your setup, as follows:&lt;/p&gt;
</description>
 <pubDate>Tue, 01 Jul 2008 15:54:00 -0700</pubDate>
</item>
<item>
 <title>how to use awk to add information to a text file</title>
 <link>http://www.ctunion.com/node/616</link>
 <description>&lt;p&gt;
&lt;code&gt;&lt;br /&gt;
awk '{if(/texttofind/) {printf("%s\nfromuser=%s\n",$0,substr($3,index($3,"&lt;")+1,index($3,"&gt;")-2))} else print $0}' "file1.txt" &gt; "file2.txt"&lt;br /&gt;
&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;where:&lt;br /&gt;
if(/texttofind/) does A) if it is true or does B) if not true&lt;/p&gt;
&lt;p&gt;texttofind is the text you want to add a new line after &lt;/p&gt;
&lt;p&gt;printf("%s\nfromuser=%s\n",$0,substr($3,index($3,"&lt;")+1,index($3,"&gt;")-2)&lt;/p&gt;
&lt;p&gt;this statement prints the origional line in string format, then drops a new line with the /n.  Then prints: fromuser=.. then prints a substring from the above line where the start of the substring is a "&lt;" and the end of the substring is a "&gt;"&lt;/p&gt;
</description>
 <pubDate>Fri, 01 Feb 2008 00:01:57 -0800</pubDate>
</item>
<item>
 <title>fsck your root partition</title>
 <link>http://www.ctunion.com/node/613</link>
 <description>&lt;p&gt;telinit 1&lt;br /&gt;
mount -o remount,ro /&lt;br /&gt;
fsck -f /dev/hd..&lt;br /&gt;
mount -o remount,rw /&lt;br /&gt;
runlevel&lt;br /&gt;
telinit 3&lt;/p&gt;
</description>
 <pubDate>Sun, 20 Jan 2008 20:25:14 -0800</pubDate>
</item>
<item>
 <title>mount iso cd image</title>
 <link>http://www.ctunion.com/node/612</link>
 <description>&lt;p&gt;mount -o loop -t iso9660 /root/Desktop/etch-custom-1013.iso  /mnt/iso&lt;/p&gt;
</description>
 <pubDate>Fri, 18 Jan 2008 16:48:50 -0800</pubDate>
</item>
<item>
 <title>move all mp3 files from 1 partition to a single folder using 1 command.</title>
 <link>http://www.ctunion.com/node/607</link>
 <description>&lt;p&gt;To make a list of all the files in a certain place...&lt;br /&gt;
&lt;code &gt;&lt;br /&gt;
locate *.mp3 | grep video &amp;gt; file.txt&lt;br /&gt;
&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;To do a mass move of all the files&lt;br /&gt;
&lt;code &gt;&lt;br /&gt;
 mv $(cat file.txt | perl -pi -e 's/ /\ /g' | cut -d "/" -f 5 | cut -d "/" -f 2 | sort | uniq) /mnt/home/music/&lt;/p&gt;
&lt;p&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;of course this is just and example, you will have to modify the cut commands and locate commands to do exactly what you want.&lt;/p&gt;
&lt;p&gt;do not just copy and paste this command into your console it will not work.&lt;/p&gt;
</description>
 <pubDate>Tue, 18 Dec 2007 19:21:38 -0800</pubDate>
</item>
<item>
 <title>OpenVPN GUI installer fails to install the TAP32 adapter</title>
 <link>http://www.ctunion.com/node/355</link>
 <description>&lt;p&gt;Ever try to install the OpenVPN GUI from openvpn.se and have the tapinstall.exe fail?&lt;/p&gt;
&lt;p&gt;Windows 2000/XP has a bug that it cannot properly detect new hardware by&lt;br /&gt;
*.inf files, if the RunOnce registry key is missing for the following&lt;br /&gt;
location:&lt;/p&gt;
&lt;p&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion&lt;/p&gt;
&lt;p&gt;This key is often used by installers to execute post-reboot programs, but&lt;br /&gt;
sometimes they accidentally delete this key.&lt;/p&gt;
&lt;p&gt;IMPORTANT: This article contains information about modifying the registry.&lt;br /&gt;
Make sure that you understand how to backup and restore the registry, in&lt;br /&gt;
case a problem occurs. Please read the linked Microsoft Knowledge Base&lt;/p&gt;
</description>
 <pubDate>Wed, 10 Oct 2007 13:10:59 -0700</pubDate>
</item>
<item>
 <title>grep an IP for use in a script</title>
 <link>http://www.ctunion.com/node/350</link>
 <description>&lt;p&gt;nslookup any.domain.tld | grep Address | cut -d ":" -f 2 | grep -v "#" | cut -d " " -f 2&lt;/p&gt;
</description>
 <pubDate>Fri, 05 Oct 2007 18:02:46 -0700</pubDate>
</item>
<item>
 <title>passwordless SSH login</title>
 <link>http://www.ctunion.com/node/339</link>
 <description>&lt;p&gt;need to run scripts on another server but dont want to have to include your passwords in the scripts?&lt;br /&gt;
Use RSA logins instead.&lt;br /&gt;
This uses a pre-generated set of public RSA keys to authenticate sessions rather than having to enter passwords.&lt;/p&gt;
&lt;p&gt;On the machine you wish to log in from:&lt;/p&gt;
&lt;p&gt;$ ssh-keygen -t rsa&lt;/p&gt;
&lt;p&gt;make sure to leave the passphrase blank!&lt;/p&gt;
&lt;p&gt;$ ssh-copy-id -i ~/.ssh/id_rsa.pub username@server&lt;/p&gt;
&lt;p&gt;you will be prompted for the user's password to authenticate the key transfer.&lt;/p&gt;
&lt;p&gt;This message will appear when the transfer is complete:&lt;/p&gt;
&lt;p&gt;"&lt;br /&gt;
Now try logging into the machine, with "ssh 'username@server'", and check in:&lt;/p&gt;
</description>
 <pubDate>Fri, 07 Dec 2007 20:59:05 -0800</pubDate>
</item>
<item>
 <title>Reset the root mysql password</title>
 <link>http://www.ctunion.com/node/314</link>
 <description>&lt;p&gt;Here is how you can reset forgotten root password,&lt;br /&gt;
Be aware that following will reset your root password:&lt;br /&gt;
# /etc/init.d/mysql stop&lt;br /&gt;
# /usr/bin/mysqld_safe --skip-grant-tables --skip-networking &amp;amp;&lt;br /&gt;
# mysql -u root&lt;br /&gt;
mysql&amp;gt; use mysql;&lt;br /&gt;
mysql&amp;gt; UPDATE user SET Password=PASSWORD("your password here") WHERE User="root";&lt;br /&gt;
mysql&amp;gt; exit&lt;/p&gt;
&lt;p&gt;# /etc/init.d/mysql stop&lt;br /&gt;
# /etc/init.d/mysql start&lt;/p&gt;
&lt;p&gt;Pay attention that, mysql can be in different folders depending on the installation, for different linux version the way you can start or stop the mysql can very.&lt;/p&gt;
</description>
 <pubDate>Tue, 18 Sep 2007 16:09:45 -0700</pubDate>
</item>
<item>
 <title>mount usb flash drive</title>
 <link>http://www.ctunion.com/node/247</link>
 <description>&lt;p&gt;mount -t vfat -o rw,nosuid,nodev,quiet,shortname=mixed,uid=1001,gid=100,umask=077,iocharset=utf8 /dev/sda1 /mnt/usb&lt;/p&gt;
</description>
 <pubDate>Fri, 10 Aug 2007 16:06:56 -0700</pubDate>
</item>
<item>
 <title>Building the rfuser (mainpine octo utilities) to unwedge your ports</title>
 <link>http://www.ctunion.com/node/229</link>
 <description>&lt;p&gt;Getting stuck channels on your mainpine octo board and you don't know why?&lt;/p&gt;
&lt;p&gt;Well, i don't know why either but if your problem is like mine, I would get stuck channels when someone would attempt to send out and a fax came in on the same channel at the same time.&lt;/p&gt;
&lt;p&gt;It would cause a reoccurring log entry in my /var/log/syslog that referred to a wedged port. This would cause the port to freeze and become unusable.&lt;/p&gt;
&lt;p&gt;Normally if your port becomes wedged in this manner, you have to reboot or do a power cycle before it will unwedge.&lt;/p&gt;
&lt;p&gt;Well, this is why you paid the extra money for the mainpine octo, you can un-stick the ports with out rebooting your server.. here is how:&lt;/p&gt;
</description>
 <pubDate>Thu, 05 Jul 2007 23:29:13 -0700</pubDate>
</item>
<item>
 <title>Use SSH to get access your XServer from windows</title>
 <link>http://www.ctunion.com/node/227</link>
 <description>&lt;p&gt;X through SSH&lt;/p&gt;
&lt;p&gt;   1. Download and install Xming.(&lt;a href="http://sourceforge.net/projects/xming"&gt;http://sourceforge.net/projects/xming&lt;/a&gt;)&lt;br /&gt;
   2. Go to Program Files-&amp;gt;Xming-&amp;gt;XLaunch&lt;br /&gt;
   3. Choose how you want your display to work.&lt;br /&gt;
   4. For “Display Number”&lt;br /&gt;
         1. Find the display number by typing env into a bash prompt and look at the DISPLAY variable.&lt;br /&gt;
   5. Click Next&lt;br /&gt;
   6. Choose “start a program” and click next&lt;br /&gt;
   7. Choose “Using Putty”, fill out the configuration information (leave the password blank) and click next until you get to the final screen&lt;br /&gt;
   8. I suggest  you save your configuration&lt;/p&gt;
</description>
 <pubDate>Sun, 24 Jun 2007 15:49:59 -0700</pubDate>
</item>
<item>
 <title>OpenVPN GUI client and Windows Vista</title>
 <link>http://www.ctunion.com/node/226</link>
 <description>&lt;p&gt;I installed the lasted stable version of the OpenVPN installer package with the GUI (openvpn2.0.9-gui-1.0.3-install.exe) on Windows Vista.  During install it says the the TAP drive is not signed by Microsoft but like always you continue anyways.&lt;/p&gt;
&lt;p&gt;I dropped in my config files including the client.ovpn file.  I test the connection and it connects to the OpenVPN server but i am unable to connect to the server behind the VPN.  After checking the client log files.  There was an error with adding the ROUTE command.  The ROUTE command adds a route to the network behind the your VPN server.  Giving you access to servers and such behind the VPN (asumming your VPN server is also a Gateway/Router/Firewall).  To fix this adding ROUTE issue you have to do two things:  Add 2 lines to the .ovpn file and run the GUI as an administrator...  Here are the steps:&lt;/p&gt;
</description>
 <pubDate>Wed, 20 Jun 2007 19:21:14 -0700</pubDate>
</item>
<item>
 <title>Debian Startup Scripts Video</title>
 <link>http://www.ctunion.com/node/225</link>
 <description>&lt;p&gt;Debian Startup Scripts Video&lt;/p&gt;
&lt;p&gt;examples:&lt;br /&gt;
update-rc.d echo default&lt;br /&gt;
update-rc.d echo remove&lt;/p&gt;
&lt;p&gt;&lt;object width="425" height="350"&gt;&lt;param name="movie" value="http://www.youtube.com/v/d39izaupvEg"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/d39izaupvEg" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;
</description>
 <pubDate>Wed, 20 Jun 2007 18:43:41 -0700</pubDate>
</item>
</channel>
</rss>
