<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>linux-system-os &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/linux-system-os/</link>
	<description>Feed of posts on WordPress.com tagged "linux-system-os"</description>
	<pubDate>Tue, 21 May 2013 23:15:26 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[CentOS 6 does not have make]]></title>
<link>http://cyruslab.net/2012/02/01/centos-6-does-not-have-make/</link>
<pubDate>Tue, 31 Jan 2012 16:51:36 +0000</pubDate>
<dc:creator>cyruslab</dc:creator>
<guid>http://cyruslab.net/2012/02/01/centos-6-does-not-have-make/</guid>
<description><![CDATA[[root@localhost VBOXADDITIONS_4.0.4_70112]# cat /var/log/vboxadd-install.log /usr/share/VBoxGuestAdd]]></description>
<content:encoded><![CDATA[<p>[root@localhost VBOXADDITIONS_4.0.4_70112]# cat /var/log/vboxadd-install.log<br />
<strong>/usr/share/VBoxGuestAdditions/test/build_in_tmp: line 55: make: command not found</strong><br />
Creating user for the Guest Additions.<br />
Creating udev rule for the Guest Additions kernel module.</p>
<p>the problem is when I was trying to install guest additions, it turned out it failed to compiled the dkms kernel, i did the install of kernel-devel (which is the source code of the kernel) and gcc, the same failure was seen&#8230; so I went to see the log and it did not have make!</p>
<p>[root@localhost VBOXADDITIONS_4.0.4_70112]# yum install make<br />
Loaded plugins: fastestmirror, refresh-packagekit<br />
Loading mirror speeds from cached hostfile<br />
* base: ftp.swin.edu.au<br />
* extras: ftp.swin.edu.au<br />
* updates: mirror.issp.co.th<br />
Setting up Install Process<br />
Resolving Dependencies<br />
&#8211;&#62; Running transaction check<br />
&#8212;&#62; Package make.i686 1:3.81-19.el6 set to be updated<br />
&#8211;&#62; Finished Dependency Resolution</p>
<p>Seriously&#8230;.This is the first time I used a Linux that has no make installed&#8230;WTF.</p>
<p><strong>Making symbolic link</strong></p>
<p><strong></strong>[root@localhost kernels]# ln -s /usr/src/kernels/2.6.32-220.4.1.el6.i686/ /usr/src/linux<br />
To install guest addition in CentOS this is necessary, because the source code of guest additional seemed to have pointed /usr/src/linux, CentOS stores its kernel source in /usr/src/kernels</p>
<p><strong><span style="color:#ff0000;">To remove the sym link remove it using rm linux without the slash. The slash at the end is a directory, sym link is just a file pointing to the destination, deleting the sym link as directory also deletes everything in the destination directory!</span></strong></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[GRUB legacy]]></title>
<link>http://cyruslab.net/2012/01/31/grub-legacy/</link>
<pubDate>Tue, 31 Jan 2012 14:51:06 +0000</pubDate>
<dc:creator>cyruslab</dc:creator>
<guid>http://cyruslab.net/2012/01/31/grub-legacy/</guid>
<description><![CDATA[GRUB legacy is the predecessor of GRUB2, recently I have been doing backups of a HDD and need to tra]]></description>
<content:encoded><![CDATA[<p>GRUB legacy is the predecessor of GRUB2, recently I have been doing backups of a HDD and need to transfer the contents into a new HDD. The previous HDD was using CentOS 6.2, CentOS is using grub 0.97 which is grub legacy.</p>
<p><a href="http://pkgs.org/centos-6-rhel-6/centos-rhel-i386/grub-0.97-75.el6.i686.rpm.html">http://pkgs.org/centos-6-rhel-6/centos-rhel-i386/grub-0.97-75.el6.i686.rpm.html</a> gives insights on where the files are if the location is at its default states.</p>
<p>Here I will document how to install grub into MBR using chroot.</p>
<p><strong>Mount the hard disk</strong></p>
<p>you need a liveCD. After you have booted with the liveCD do the below, this example has three partitions.</p>
<p>/dev/sda1 / ext4</p>
<p>/dev/sda2 swap</p>
<p>/dev/sda3 /home ext4</p>
<p><span style="color:#0000ff;"><strong>mount /dev/sda1 /mnt/</strong></span></p>
<p><strong><span style="color:#0000ff;">mount /dev/sda3 /mnt/home/</span></strong></p>
<p><strong>Mount proc and bind the mounted hdd to /dev</strong></p>
<p><strong><span style="color:#0000ff;">mount -t proc none /mnt/proc</span></strong></p>
<p><strong><span style="color:#0000ff;">mount -o bind /dev /mnt/dev/</span></strong></p>
<p><strong>Change root from / to /mnt/</strong></p>
<p><strong><span style="color:#0000ff;">chroot /mnt /bin/bash</span></strong></p>
<p>This will transfer from &#8220;/&#8221; to the root mounted on /mnt/, now you can execute bash commands on the mounted harddisk just like it is loaded on your system, whichever you changed will be updated and stored in the mounted hard disk.</p>
<p><strong>Run GRUB</strong></p>
<p>As from <a href="http://pkgs.org/centos-6-rhel-6/centos-rhel-i386/grub-0.97-75.el6.i686.rpm.html">http://pkgs.org/centos-6-rhel-6/centos-rhel-i386/grub-0.97-75.el6.i686.rpm.html</a>, the default path for grub is in /sbin/.</p>
<p><strong><span style="color:#0000ff;">/sbin/grub</span></strong></p>
<p>grub&#62; prompt appears.</p>
<p><strong><span style="color:#0000ff;">find /boot/grub/stage1</span></strong>, this step is optional, executing this command will output the partition where the vmlinuz and initrd files are located.</p>
<p>Since /dev/sda1 is the / directory, /root/ is under / as well as there are no additional partition for /root.</p>
<p>/dev/sdXY = hdX,Y, where X is the harddrive number and Y is the partition number for /dev/sda1 the equivalent is hence hd0,0. 0 is the first number of the harddisk and partition.</p>
<p><strong><span style="color:#0000ff;">root (hd0,0)</span></strong></p>
<p><strong><span style="color:#0000ff;">setup (hd0)</span></strong></p>
<p><strong><span style="color:#0000ff;">quit</span></strong></p>
<p>This installs the grub into MBR.</p>
<p><strong>Kernel panic!</strong></p>
<p>My system encountered kernel panic and stopped. This is because the previously backup grub.conf file points to UUID and the UUID does not exist.</p>
<p>My way of doing it is to remove the UUID and statically define the partition like this:</p>
<p><strong>kernel /boot/vmlinuz-version root=/dev/sda1 ro</strong></p>
<p>UUID is a dynamic way to figure out which partition is which, however it gives problem in my situation. So the kernel line in the grub.conf may look like this:</p>
<p><strong>kernel /boot/vmlinuz-2.6.38-8-generic root=UUID=c2bb0352-8fa3-457a-8bcd-00a35a2783fc ro</strong></p>
<p>To check your partitions&#8217; UUID do this:</p>
<p><span style="color:#0000ff;"><strong>blkid</strong></span></p>
<p>For my situation the UUIDs presented by blkid command were all different from UUIDs in /etc/fstab as well as in grub.conf.</p>
<p>Note that /boot/grub/menu.lst is a symbolic link of /boot/grub/grub.conf, changing grub.conf also changes menu.lst.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[GRUB2]]></title>
<link>http://cyruslab.net/2012/01/31/grub2/</link>
<pubDate>Tue, 31 Jan 2012 02:02:48 +0000</pubDate>
<dc:creator>cyruslab</dc:creator>
<guid>http://cyruslab.net/2012/01/31/grub2/</guid>
<description><![CDATA[Recently I have been working with GRUB to boot a rescued harddisk, I have searched for many solution]]></description>
<content:encoded><![CDATA[<p>Recently I have been working with GRUB to boot a rescued harddisk, I have searched for many solutions but it seemed those commands presented in those search were from grub legacy.</p>
<p><strong>To Install GRUB2 to MBR using LiveCD</strong></p>
<p>1. Use a LiveCD that has grub2 distribution, if do not have connect to the internet and download using apt or yum depending on your Linux distro, some distro does not have apt and yum.</p>
<p>2. Mount the harddrive to /mnt/. To specifically create a sub directory under /mnt/:</p>
<p><span style="color:#000080;"><strong>install -d /mnt/myhdd/</strong></span></p>
<p><span style="color:#000080;"><strong>mount /dev/sda1 /mnt/myhdd/</strong></span></p>
<p>/dev/sda1/ is an example, you should use<span style="color:#000080;"><strong><em> fdisk -l</em></strong></span> command to observe your harddrive partition number. In this example /dev/sda1/ is the partition that contains the /boot/ directory and itself is also mounted on /.</p>
<p>3. Use grub-install to install the grub2 to /dev/sda/ MBR. You need root access.</p>
<p><span style="color:#000080;"><strong>grub-install &#8211;root-directory=/mnt/myhdd/ /dev/sda/</strong></span></p>
<p>4. Reboot. You will see a grub prompt:</p>
<p>grub&#62;</p>
<p>Lots of solution I have googled could not be used for my situation:</p>
<p><a href="https://wiki.archlinux.org/index.php/GRUB">https://wiki.archlinux.org/index.php/GRUB</a></p>
<p>Commands presented in this post are not present in my grub. It is obvious that these commands are from grub legacy.</p>
<p><a href="http://www.dedoimedo.com/computers/grub-2.html">http://www.dedoimedo.com/computers/grub-2.html</a></p>
<p>This one looks the most promising, it contains great tutorials unfortunately my grub does not have the commands (particularly kernel command) the tutorial presented. Oh by the way I am using grub version 1.98.</p>
<p><a href="https://help.ubuntu.com/community/Grub2">https://help.ubuntu.com/community/Grub2</a></p>
<p>This tutorial is the saviour, it accurately documented the commands I need for my situation.</p>
<p>In the grub prompt, type:</p>
<p><span style="color:#000080;"><strong>set root=(hd0,1)</strong></span></p>
<p>before doing this you should do<strong><em> ls</em></strong> command to see the available hd0.</p>
<p>hdX,Y where X is the number of the harddisk drive number and Y is the partition number. Partition number starts from 1 and not 0. So for my situation /dev/sda1 is hd0,1.</p>
<p><span style="color:#000080;"><strong>linux /boot/vmlinuz-&#60;version&#62;.i686 root=/dev/sda1 ro</strong></span></p>
<p>This command tells grub where to load the kernel and which is the root partition, for my situation /dev/sda/ is /. The kernel is located in /boot/ directory.</p>
<p><span style="color:#000080;"><strong>initrd /boot/initrd-&#60;version&#62;.img </strong></span></p>
<p>For my situation the initrd image is stored in /boot/ directory.</p>
<p>Once ok I can issue <strong><em>boot</em></strong> command to boot the computer.</p>
<p><strong>Summary</strong>:</p>
<p><span style="color:#ff0000;"><strong>set root=(hdX,Y)</strong></span></p>
<p><span style="color:#ff0000;"><strong>linux /boot/vmlinuz /dev/sdXY/ ro</strong></span></p>
<p><span style="color:#ff0000;"><strong>initrd /boot/initrd.img</strong></span></p>
<p><span style="color:#ff0000;"><strong>boot</strong></span></p>
<p>After everything is initialzed run update-grub command so that next time my system can boot, the above commands are temporary commands.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Upgrading Linux Mint 11 kernel]]></title>
<link>http://cyruslab.net/2012/01/27/upgrading-linux-mint-11-kernel/</link>
<pubDate>Thu, 26 Jan 2012 18:56:21 +0000</pubDate>
<dc:creator>cyruslab</dc:creator>
<guid>http://cyruslab.net/2012/01/27/upgrading-linux-mint-11-kernel/</guid>
<description><![CDATA[Previously I got an Linux kernel upgrade from 2.6.38-8 to 3.0.0-12 from the Ubuntu Natty repository,]]></description>
<content:encoded><![CDATA[<p>Previously I got an Linux kernel upgrade from 2.6.38-8 to 3.0.0-12 from the Ubuntu Natty repository, I could not find the site which gave the instruction. Today I will want to upgrade my Kernel 3.0.0-12 to 3.1.4.</p>
<p>I found out that I can actually get various compiled Kernel from here <a href="http://kernel.ubuntu.com/~kernel-ppa/mainline/" target="_blank">http://kernel.ubuntu.com/~kernel-ppa/mainline/</a></p>
<p><strong>Upgrade in ORDER</strong></p>
<p>1. Install linux header that ends with all.deb:</p>
<p>sudo dpkg -i linux-headers-3.1.4-030104_3.1.4-030104.201111281851_all.deb</p>
<p>2. Install linux header that ends with amd64.deb:</p>
<p>sudo dpkg -i linux-headers-3.1.4-030104-generic_3.1.4-030104.201111281851_amd64.deb</p>
<p>3. Install linux image that ends with amd64.deb:</p>
<p>sudo dpkg -i linux-image-3.1.4-030104-generic_3.1.4-030104.201111281851_amd64.deb</p>
<p>4. Grub will be upgraded after linux image is installed. Reboot</p>
<p>Reference: <a href="http://forums.linuxmint.com/viewtopic.php?f=42&#38;t=40185&#38;sid=f703bccdd769f633301f4a31e06daf5e" target="_blank">http://forums.linuxmint.com/viewtopic.php?f=42&#38;t=40185&#38;sid=f703bccdd769f633301f4a31e06daf5e</a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Installing NVidia on Backtrack5R1]]></title>
<link>http://cyruslab.net/2012/01/26/installing-nvidia-on-backtrack5r1/</link>
<pubDate>Thu, 26 Jan 2012 07:11:14 +0000</pubDate>
<dc:creator>cyruslab</dc:creator>
<guid>http://cyruslab.net/2012/01/26/installing-nvidia-on-backtrack5r1/</guid>
<description><![CDATA[I had hair pulling experience installing nvidia drivers on Backtrack-linux, be it the driver from ht]]></description>
<content:encoded><![CDATA[<p>I had hair pulling experience installing nvidia drivers on Backtrack-linux, be it the driver from <a href="http://www.nvidia.com" rel="nofollow">http://www.nvidia.com</a> or nvidia-current from backtrack repository, I got error on DKMS building or got error to build nvidia.ko and X could not start.</p>
<p>I have googled for many solutions for hours:</p>
<p>1. <a href="http://samiux.blogspot.com/2011/05/howto-bug-fix-for-backtrack-5.html">http://samiux.blogspot.com/2011/05/howto-bug-fix-for-backtrack-5.html</a></p>
<p>This looked promising, but not working for my situation.</p>
<p>2. <a href="http://askubuntu.com/questions/37590/nvidia-drivers-not-working-after-upgrade-why-can-i-only-see-terminal">http://askubuntu.com/questions/37590/nvidia-drivers-not-working-after-upgrade-why-can-i-only-see-terminal</a></p>
<p>This looked promising as well, not working at all, there are errors in the syntax though.</p>
<p>3. <a href="http://ewangi.info/660/backtrack-5r1-first-hot-review-bugs-fixes/">http://ewangi.info/660/backtrack-5r1-first-hot-review-bugs-fixes/</a></p>
<p>After hours of finding with the correct keywords with google, this solution actually worked for my situation!</p>
<p><strong>Blacklist</strong></p>
<p>nano /etc/modprode.d/blacklist.conf</p>
<p>blacklist vga16fb</p>
<p>blacklist nouveau</p>
<p>blacklist nvidiafb</p>
<p>blacklist rivatv</p>
<p>blacklist rivafb</p>
<p>This blacklist configuration file is to prevent loading of the drivers especially nouveau, nouveau conflicts with nvidia.</p>
<p><strong>Remove nvidia completely</strong></p>
<p>apt-get remove &#8211;purge nvidia-*</p>
<p>This is to start clean. Then reboot.</p>
<p><strong>Add ubuntu repository</strong></p>
<p>add-apt-repository ppa:ubuntu-x-swat/x-updates</p>
<p>To use add-apt-repository you need to install python-software-properties</p>
<p><strong>Install nvidia-current</strong></p>
<p>apt-get update</p>
<p>apt-get install nvidia-current nvidia-current-modaliases nvidia-settings</p>
<p>When you choose to install nvidia-current, nvidia-settings will be installed as well.</p>
<p>Reboot. No need to run nvidia-xconfig.</p>
<p>Backtrack-linux nvidia-current is 195.36.24 whereas the ubuntu&#8217;s nvidia-current is 290.10 which is the latest. I wanted to use the CUDA feature which made me motivated to install nvidia-current driver&#8230;</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[bin/cue conversion to iso/cdr on Linux]]></title>
<link>http://cyruslab.net/2012/01/24/bincue-conversion-to-isocdr-on-linux/</link>
<pubDate>Mon, 23 Jan 2012 21:29:05 +0000</pubDate>
<dc:creator>cyruslab</dc:creator>
<guid>http://cyruslab.net/2012/01/24/bincue-conversion-to-isocdr-on-linux/</guid>
<description><![CDATA[Recently I have bin and cue cd image which I need to mount on my Linux however I have found problem]]></description>
<content:encoded><![CDATA[<p>Recently I have bin and cue cd image which I need to mount on my Linux however I have found problem mounting them using the usual way which I mount iso images.</p>
<p>From forums I found that I need to use bchunk to convert the bin/cue to iso/cdr first then mount the converted iso. Conversion was surprisingly fast.</p>
<p>command line: bchunk cd\ 4.bin cd\ 4.cue cd4</p>
<p>Reading the CUE file:</p>
<p>Track 1: MODE1/2352 01 00:00:00</p>
<p>Writing tracks:</p>
<p>1: cd401.iso 237/237 MB [********************] 100 %</p>
<p>reference: <a href="http://www.linuxforums.org/forum/ubuntu-linux/97586-mount-cue-bin-image.html" target="_blank">http://www.linuxforums.org/forum/ubuntu-linux/97586-mount-cue-bin-image.html</a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Configuring Jailed SFTP]]></title>
<link>http://cyruslab.net/2011/12/29/configuring-jailed-sftp/</link>
<pubDate>Thu, 29 Dec 2011 09:07:25 +0000</pubDate>
<dc:creator>cyruslab</dc:creator>
<guid>http://cyruslab.net/2011/12/29/configuring-jailed-sftp/</guid>
<description><![CDATA[By default if you do service ssh start you can access the Linux system remotely using sftp or ssh. S]]></description>
<content:encoded><![CDATA[<p>By default if you do <span style="color:#0000ff;">service ssh start </span>you can access the Linux system remotely using sftp or ssh. Supposed you want to restrict non-root users to /home/sftp through sftp you can do the following:</p>
<p>First you can check if there is a group for sftp:</p>
<p><span style="color:#0000ff;">cat /etc/group &#124;grep sftp </span></p>
<p><span style="color:#000000;">If nothing is shown then sftp group is non-existent. Create a group sftp:</span></p>
<p>root@bt:~# <span style="color:#0000ff;">addgroup sftp</span><br />
Adding group `sftp&#8217; (GID 1001) &#8230;<br />
Done.</p>
<p>root@bt:~# <span style="color:#0000ff;">cat /etc/group &#124;grep sftp</span><br />
sftp:x:1001:</p>
<p>The next is to create user and attached them to group sftp.</p>
<p>root@bt:~#</p>
<p>root@bt:~# <span style="color:#0000ff;">adduser &#8211;home /home/sftp sftpuser</span><br />
Adding user `sftpuser&#8217; &#8230;<br />
Adding new group `sftpuser&#8217; (1002) &#8230;<br />
Adding new user `sftpuser&#8217; (1001) with group `sftpuser&#8217; &#8230;<br />
Creating home directory `/home/sftpuser&#8217; &#8230;<br />
Copying files from `/etc/skel&#8217; &#8230;<br />
Enter new UNIX password:<br />
Retype new UNIX password:<br />
passwd: password updated successfully<br />
Changing the user information for sftpuser<br />
Enter the new value, or press ENTER for the default<br />
Full Name []: SFTP user<br />
Room Number []:<br />
Work Phone []:<br />
Home Phone []:<br />
Other []:<br />
Is the information correct? [Y/n] y</p>
<p>root@bt:~# <span style="color:#0000ff;">adduser sftpuser sftp</span><br />
Adding user `sftpuser&#8217; to group `sftp&#8217; &#8230;<br />
Adding user sftpuser to group sftp<br />
Done.</p>
<p>Edit the sshd config file in <span style="color:#ff0000;">/etc/ssh/sshd_config</span>:</p>
<p>Look for key word Subsystem, you will find a default clause that looks like this:</p>
<p>Subsystem sftp /usr/lib/openssh/sftp-server</p>
<p>Changed to this:</p>
<p>#Subsystem sftp /usr/lib/openssh/sftp-server<br />
<span style="color:#ff0000;">Subsystem sftp internal-sftp</span></p>
<p>Scroll down until the end of file and add these:</p>
<p><span style="color:#ff0000;">Match group sftp</span><br />
<span style="color:#ff0000;">ChrootDirectory /home/%u</span><br />
<span style="color:#ff0000;">X11Forwarding no</span><br />
<span style="color:#ff0000;">AllowTcpForwarding no</span><br />
<span style="color:#ff0000;">ForceCommand internal-sftp</span></p>
<p>Save the config file and exit.</p>
<p>This is to change /home/sftpuser directory to a root directory when sftpuser logs in, this is to jail sftpuser only to /home/sftpuser and no where else.</p>
<p>chown root:root /home/sftpuser</p>
<p>usermod -d / sftpuser</p>
<p>Originally I made sftpuser to be in /home/sftpuser but I failed to jail it, sftp user can break out of /home/sftpuser and go anywhere within the system. Now I shall test the jailing by sftping to my localhost.</p>
<p>root@bt:~# sftp sftpuser@localhost<br />
Connecting to localhost&#8230;<br />
sftpuser@localhost&#8217;s password:<br />
sftp&#62; ls<br />
sftp&#62; pwd<br />
Remote working directory: /<br />
sftp&#62;</p>
<p>sftp&#62; cd ../../../<br />
sftp&#62; pwd<br />
Remote working directory: /<br />
sftp&#62; ls<br />
sftp&#62;</p>
<p>Reference: <a title="www.debian-administration.org/articles/590" href="http://www.debian-administration.org/articles/590">www.debian-administration.org/articles/590</a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Setting up dhcp server on linux according to your way]]></title>
<link>http://cyruslab.net/2011/12/29/setting-up-dhcp-server-on-linux-according-to-your-way/</link>
<pubDate>Thu, 29 Dec 2011 08:22:59 +0000</pubDate>
<dc:creator>cyruslab</dc:creator>
<guid>http://cyruslab.net/2011/12/29/setting-up-dhcp-server-on-linux-according-to-your-way/</guid>
<description><![CDATA[You will need dhcp3-server installed on Linux. apt-get install dhcp3-server The pool of your dhcp3-s]]></description>
<content:encoded><![CDATA[<p>You will need dhcp3-server installed on Linux.</p>
<p>apt-get install dhcp3-server</p>
<p>The pool of your dhcp3-server can be configured in /etc/dhcp3/dhcpd.conf file. You can read the examples described in the configuration file. If you do not wish to modify this configuration file you can create one your self.</p>
<p>touch /home/dhcpd/dhcpd.conf</p>
<p>chown dhcpd:dhcpd /home/dhcpd/dhcpd.conf</p>
<p>nano /home/dhcpd/dhcpd.conf</p>
<p>Write the following according to your needs:</p>
<p>ddns-update-style none;</p>
<p>default-lease-time 600;</p>
<p>max-lease-time 7200;</p>
<p>authoritative; #if the Linux dhcp server is the official server on your local network.</p>
<p>log-facility local7;</p>
<p>subnet 192.168.1.0 netmask 255.255.255.0 {</p>
<p>option routers 192.168.1.1;</p>
<p>option domain-name-servers 192.168.1.1; #If your router is also your dns server.</p>
<p>range 192.168.1.100 192.168.1.254;}</p>
<p>Save the file ctrl+x.</p>
<p>If you want to use your own log for dhcpd in /tmp/</p>
<p>touch /tmp/dhcpd.log</p>
<p>chown dhcpd:dhcpd /tmp/dhcpd.log</p>
<p>If you want to create and use your own created pid location instead of /var/run/dhcp3-server/:</p>
<p>mkdir -p /var/run/dhcpd</p>
<p>chown -R dhcpd:dhcpd /var/run/dhcpd</p>
<p>touch /var/lib/dhcp3/dhcpd.leases</p>
<p>This makes the sub directory dhcpd as well as the contents inside owned by owner dhcpd and group dhcpd.</p>
<p>To start dhcp3-server according to your way:</p>
<p>dhcp3 -f -cf /home/dhcpd/dhcpd.conf -lf /tmp/dhcpd.log -pf /var/run/dhcpd/pid eth0</p>
<p>-f : run as a process</p>
<p>-cf : location of the config file</p>
<p>-lf : location of the log file</p>
<p>-pf : location of the process id file</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Solving network-manager-gnome not showed in panel for Backtrack5R1]]></title>
<link>http://cyruslab.net/2011/12/29/solving-network-manager-gnome-not-showed-in-panel-for-backtrack5r1/</link>
<pubDate>Thu, 29 Dec 2011 07:55:17 +0000</pubDate>
<dc:creator>cyruslab</dc:creator>
<guid>http://cyruslab.net/2011/12/29/solving-network-manager-gnome-not-showed-in-panel-for-backtrack5r1/</guid>
<description><![CDATA[The reason I turned to use network-manager-gnome instead of wicd-gtk is because wicd-gtk has no opti]]></description>
<content:encoded><![CDATA[<p>The reason I turned to use network-manager-gnome instead of wicd-gtk is because wicd-gtk has no option for setting up a connection to hidden ssid wpa network.</p>
<p>I encountered a problem after I installed network-manager-gnome from repositories, that is although service network-manager has started, no icons of network manager appeared in the panel. I checked from System &#62; Preferences &#62; Startup Application and saw nm-applet &#8211;sm-disable was added.</p>
<p>The solution to this problem is simple:</p>
<p>Use your favourite text editor and edit the /etc/network/interfaces:</p>
<p>root@bt:~# cat /etc/network/interfaces<br />
auto lo<br />
iface lo inet loopback</p>
<p>#auto eth0<br />
#iface eth0 inet dhcp</p>
<p>#auto eth1<br />
#iface eth1 inet dhcp</p>
<p>#auto eth2<br />
#iface eth2 inet dhcp</p>
<p>#auto ath0<br />
#iface ath0 inet dhcp</p>
<p>#auto wlan0<br />
#iface wlan0 inet dhcp</p>
<p>By default everything was auto, I commented out everything except for these:</p>
<p>auto lo</p>
<p>iface lo inet loopback</p>
<p>After commented the other autos, restart the network-manager service:</p>
<p>service network-manager restart</p>
<p>immediately after restart the network-manager-gnome icon appeared on the top right hand corner of the panel.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Security: Linux History command]]></title>
<link>http://cyruslab.net/2011/08/08/security-linux-history-command/</link>
<pubDate>Mon, 08 Aug 2011 15:27:08 +0000</pubDate>
<dc:creator>cyruslab</dc:creator>
<guid>http://cyruslab.net/2011/08/08/security-linux-history-command/</guid>
<description><![CDATA[History command can be useful for you to refer to, you can type history in your terminal and you wil]]></description>
<content:encoded><![CDATA[<p>History command can be useful for you to refer to, you can type history in your terminal and you will see the commands you had executed.</p>
<pre>root@bt:~# history
  956  history
  957  which .bash_history
  958  locate .bash_history
  959  nano .bash_history 
  960  clear
  961  history
root@bt:~#</pre>
<p>Suppose you want to execute history number 960:</p>
<p>You do !960.</p>
<p>Clear history:</p>
<pre>root@bt:~# history -c
root@bt:~# rm .bash_history</pre>
<p>You may have cleared your history with history -c command, but in .bash_history still contains your history up to your first command, you can choose to remove this file if you want.</p>
<p>The implication for history command is that you allow footprinting by a hacker to understand your linux ability through studying the commands you have executed, history command will also review some files or directories you have referred to, and also some configuration you had attempted to execute before.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Linux: Mount a filesystem onto linux]]></title>
<link>http://cyruslab.net/2011/08/08/linux-mount-a-filesystem-onto-linux/</link>
<pubDate>Mon, 08 Aug 2011 15:18:15 +0000</pubDate>
<dc:creator>cyruslab</dc:creator>
<guid>http://cyruslab.net/2011/08/08/linux-mount-a-filesystem-onto-linux/</guid>
<description><![CDATA[Check your file system root@bt:~# fdisk -l Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63]]></description>
<content:encoded><![CDATA[<p><strong><span style="text-decoration:underline;">Check your file system</span></strong></p>
<pre>root@bt:~# <strong>fdisk -l</strong>

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xd9dce570

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      102400    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2              13       34999   281018368    7  HPFS/NTFS
/dev/sda3           34999       57982   184616961    f  W95 Ext'd (LBA)
/dev/sda4           57982       60802    22644736   27  Unknown
/dev/sda5           34999       55316   163202954    7  HPFS/NTFS
/dev/sda6           55317       57827    20169576   83  Linux
/dev/sda7           57828       57982     1244160   82  Linux swap / Solaris</pre>
<p>Suppose I want to mount /dev/sda5 upon every start up.</p>
<pre>root@bt:~# nano /etc/fstab 
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# &#60;file system&#62; &#60;mount point&#62;   &#60;type&#62;  &#60;options&#62;       &#60;dump&#62;  &#60;pass&#62;
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda6 during installation
UUID=8b589d8d-01c5-47ef-a4a9-08b8e060bfff /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda7 during installation
UUID=7c2cc509-4b1b-4aa9-9146-e8c98802a946 none            swap    sw              0       0
<strong>/dev/sda5 /mnt/windows ntfs noexec,nosuid 0 0</strong></pre>
<p>Explanation:</p>
<p>First column is filesystem which is /dev/sda5</p>
<p>Second column is mount point which is /mnt/windows</p>
<p>Third column is type which is NTFS</p>
<p>Fourth column is option which are noexec and nosuid.</p>
<p>noexec = no execution.</p>
<p>nosuid = no superuser.</p>
<p>nodev = no device mounting.</p>
<p>Save the fstab file.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Linux: Working with archivers (gzip, bzip2 and 7zip)]]></title>
<link>http://cyruslab.net/2011/08/04/linux-working-with-archivers-gzip-bzip2-and-7zip/</link>
<pubDate>Wed, 03 Aug 2011 17:06:31 +0000</pubDate>
<dc:creator>cyruslab</dc:creator>
<guid>http://cyruslab.net/2011/08/04/linux-working-with-archivers-gzip-bzip2-and-7zip/</guid>
<description><![CDATA[Method 1 Step 1: Group the file you need to compress by using tar command. root@bt:~/fw-scripts# tar]]></description>
<content:encoded><![CDATA[<p><strong><span style="text-decoration:underline;">Method 1</span></strong></p>
<p>Step 1: Group the file you need to compress by using tar command.</p>
<pre>root@bt:~/fw-scripts# tar -cf firewall.tar firewall.sh
root@bt:~/fw-scripts# ls -la
total 24
drwxr-xr-x  2 root root  4096 2011-08-04 00:35 .
drwx------ 33 root root  4096 2011-08-04 00:00 ..
-rwxr--r--  1 root root   967 2011-08-03 01:42 firewall.sh
-rw-r--r--  1 root root 10240 2011-08-04 00:35 <strong>firewall.tar</strong></pre>
<p>Step 2: Use an archiver of your choice. Use gzip.</p>
<pre>root@bt:~/fw-scripts# gzip -9 firewall.tar
root@bt:~/fw-scripts# ls -la
total 16
drwxr-xr-x  2 root root 4096 2011-08-04 00:37 .
drwx------ 33 root root 4096 2011-08-04 00:00 ..
-rwxr--r--  1 root root  967 2011-08-03 01:42 firewall.sh
-rw-r--r--  1 root root  485 2011-08-04 00:35 <strong>firewall.tar.gz</strong></pre>
<p>Use bzip2.</p>
<pre>root@bt:~/fw-scripts# bzip2 firewall.tar
root@bt:~/fw-scripts# ls -la
total 16
drwxr-xr-x  2 root root 4096 2011-08-04 00:39 .
drwx------ 33 root root 4096 2011-08-04 00:00 ..
-rwxr--r--  1 root root  967 2011-08-03 01:42 firewall.sh
-rw-r--r--  1 root root  519 2011-08-04 00:38 <strong>firewall.tar.bz2</strong></pre>
<p>To make the compression better:</p>
<pre>root@bt:~/fw-scripts# bzip2 --best firewall.tar
<span class="Apple-style-span" style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size:13px;line-height:19px;white-space:normal;">This is the same as gzip -9 option. You can simply compress a tar file with only the gzip command without any options.</span></pre>
<p><span style="font-size:x-small;"><span class="Apple-style-span" style="line-height:19px;white-space:normal;"><strong><span style="text-decoration:underline;">Decompress the files</span></strong> </span></span></p>
<p>For bzip2:</p>
<pre>root@bt:/tmp# bzip2 -d firewall.tar.bz2 
root@bt:/tmp# ls firewall.tar
<strong>firewall.tar</strong></pre>
<p>For gzip:</p>
<pre>root@bt:/tmp# gzip -d firewall.tar.gz
root@bt:/tmp# ls -l firewall.tar
-rw-r--r-- 1 root root 10240 2011-08-04 00:46 <strong>firewall.tar</strong></pre>
<p>To untar the file:</p>
<pre>root@bt:/tmp# tar -xf firewall.tar
root@bt:/tmp# ls firewall.*
<strong>firewall.sh</strong>  firewall.tar</pre>
<p>Check the tar file content before unzip:</p>
<pre>root@bt:/tmp# tar -tf firewall.tar
firewall.sh</pre>
<p><strong><span style="text-decoration:underline;">Method 2</span></strong></p>
<p>Compress with gzip</p>
<pre>root@bt:~/fw-scripts# tar -czf firewall.tar.gz firewall.sh 
root@bt:~/fw-scripts# ls
firewall.sh  <strong>firewall.tar.gz</strong></pre>
<p>Compress with bzip2:</p>
<pre>root@bt:~/fw-scripts# tar -cjf firewall.tar.bz2 firewall.sh
root@bt:~/fw-scripts# ls
firewall.sh  <strong>firewall.tar.bz2</strong>  firewall.tar.gz</pre>
<p>Note: The f option stands for file, hence it must always be the last letter of your option. You can rearrange tar -czf or tar -zcf it is the same, but f is always the last and immediately follow by f will always be a filename of your compressed file. This works for bzip2 as well.</p>
<p><strong><span style="text-decoration:underline;">Compress file with 7zip</span></strong></p>
<p>Compress your file into zip format:</p>
<pre>ot@bt:~/fw-scripts# 7z a firewall.zip firewall.sh 

7-Zip 9.04 beta  Copyright (c) 1999-2009 Igor Pavlov  2009-05-30
p7zip Version 9.04 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,8 CPUs)
Scanning

Creating archive firewall.zip

Compressing  firewall.sh      

Everything is Ok
root@bt:~/fw-scripts# ls
firewall.sh  firewall.tar.bz2  firewall.tar.gz  <strong>firewall.zip</strong></pre>
<p>Compress in bzip2:</p>
<pre>root@bt:~/fw-scripts# 7z a firewall.tar.bz2 firewall.sh 

7-Zip 9.04 beta  Copyright (c) 1999-2009 Igor Pavlov  2009-05-30
p7zip Version 9.04 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,8 CPUs)
Scanning

Creating archive firewall.tar.bz2

Compressing  firewall.sh      

Everything is Ok</pre>
<p>Likewise if you want to zip in gzip format is also done the same.</p>
<p><strong><span style="text-decoration:underline;">Decompress with 7zip</span></strong></p>
<p>Decompress zip:</p>
<pre>root@bt:/tmp# 7z e firewall.zip 

7-Zip 9.04 beta  Copyright (c) 1999-2009 Igor Pavlov  2009-05-30
p7zip Version 9.04 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,8 CPUs)

Processing archive: firewall.zip

file firewall.sh
already exists. Overwrite with
firewall.sh?
(Y)es / (N)o / (A)lways / (S)kip all / A(u)to rename all / (Q)uit? y
Extracting  firewall.sh

Everything is Ok

Size:       967
Compressed: 475</pre>
<p>Decompress bzip2:</p>
<pre>ot@bt:/tmp# 7z e firewall.tar.bz2 

7-Zip 9.04 beta  Copyright (c) 1999-2009 Igor Pavlov  2009-05-30
p7zip Version 9.04 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,8 CPUs)

Processing archive: firewall.tar.bz2

file firewall.tar
already exists. Overwrite with
firewall.tar?
(Y)es / (N)o / (A)lways / (S)kip all / A(u)to rename all / (Q)uit? y
Extracting  firewall.tar

Everything is Ok

Size:       967
Compressed: 425</pre>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Security: Script for iptables and how to start up.]]></title>
<link>http://cyruslab.net/2011/08/03/security-script-for-iptables-and-how-to-start-up/</link>
<pubDate>Wed, 03 Aug 2011 15:35:22 +0000</pubDate>
<dc:creator>cyruslab</dc:creator>
<guid>http://cyruslab.net/2011/08/03/security-script-for-iptables-and-how-to-start-up/</guid>
<description><![CDATA[#!/bin/bash IPTABLES=/sbin/iptables SAVE=/sbin/iptables-save #RESTORE=/sbin/iptables-restore #INITIA]]></description>
<content:encoded><![CDATA[<pre>#!/bin/bash
IPTABLES=/sbin/iptables
SAVE=/sbin/iptables-save
#RESTORE=/sbin/iptables-restore

#INITIALIZE IPTABLES
$IPTABLES --flush
$IPTABLES --delete-chain

#INBOUND RULES, ALLOW ONLY TRAFFIC IN THE STATE TABLE
$IPTABLES -A INPUT -m state -p tcp --state ESTABLISHED -j ACCEPT
$IPTABLES -A INPUT -m state -p udp --state ESTABLISHED -j ACCEPT
$IPTABLES -A INPUT -m state -p icmp --state ESTABLISHED,RELATED -j ACCEPT
#$IPTABLES -A INPUT -m tcp -p tcp --dport 22 -i lo -j ACCEPT
$IPTABLES -A INPUT -m tcp -p tcp --dport 8834 -i lo -j ACCEPT

#OUTBOUND STATEFUL RULES.
$IPTABLES -A OUTPUT -m state -p tcp --state NEW,ESTABLISHED -j ACCEPT
$IPTABLES -A OUTPUT -m state -p udp --state NEW,ESTABLISHED -j ACCEPT
$IPTABLES -A OUTPUT -m state -p icmp --state NEW,ESTABLISHED,RELATED -j ACCEPT

#DEFAULT DROP AT THE END OF THE RULES.
$IPTABLES -A INPUT -j DROP
$IPTABLES -A FORWARD -j DROP
$IPTABLES -A OUTPUT -j DROP

$SAVE &#62; /root/firewall.cfg

#GRACEFUL EXIT
exit 0</pre>
<p>The above is the script written by myself, it is not very flexible as I am still learning bash scripting myself&#8230;I want to be spoon fed :p (joking&#8230;*wink*)</p>
<p>This script creates a quick and simple way to get started with iptables. iptables provides stateful firewalling. The script will result in firewall.cfg, this firewall.cfg will be loaded into /etc/rc.local so that everytime when you start your linux it will be loaded, if you do not do this during startup, you will have to reload the firewall.cfg everytime you start your linux. The destination tcp port 8834 is for reconnecting back to my nessusd using 127.0.0.1. Basically I did not write a rule to allow icmp from loopback interface&#8230; so.. you cannot ping 127.0.0.1, you can change this the way it works for you.</p>
<pre>#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/sbin/iptables-restore &#60; /root/firewall.cfg

exit 0</pre>
<p>The above is the rc.local script, by default nothing except for <em>exit 0</em> exists.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Security: Configuring basic stateful firewall for Backtrack 5]]></title>
<link>http://cyruslab.net/2011/07/25/security-configuring-basic-stateful-firewall-for-backtrack-5/</link>
<pubDate>Mon, 25 Jul 2011 07:22:55 +0000</pubDate>
<dc:creator>cyruslab</dc:creator>
<guid>http://cyruslab.net/2011/07/25/security-configuring-basic-stateful-firewall-for-backtrack-5/</guid>
<description><![CDATA[Outbound rules iptables -A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT iptables -A OUTP]]></description>
<content:encoded><![CDATA[<p><strong><span style="text-decoration:underline;">Outbound rules</span></strong></p>
<pre>iptables -A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p udp -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p icmp -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT</pre>
<p><strong><span style="text-decoration:underline;">Inbound rules</span></strong></p>
<pre>iptables -A INPUT -p tcp -m state --state ESTABLISHED -j ACCEPT
iptables -A INPUT -p udp -m state --state ESTABLISHED -j ACCEPT
iptables -A INPUT -p icmp -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -j DROP</pre>
<p><strong><span style="text-decoration:underline;">Make iptables rules permanent every for every reboot</span></strong></p>
<p>IPtables rules are flushed after every reboot. To make it permanent:</p>
<p>Step 1: Save the iptables rules to a file</p>
<pre>iptables-save &#62; /root/fw-cfg</pre>
<p>Step 2: Append a line in /etc/rc.local:</p>
<pre>iptables-restore &#60; /root/fw-cfg</pre>
<p>Step 3: Save the rc.local.</p>
<p>Henceforth every reboot will have your iptables rules defined.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[randomize_va_space values]]></title>
<link>http://cyruslab.net/2011/06/12/randomize_va_space-values/</link>
<pubDate>Sun, 12 Jun 2011 11:01:14 +0000</pubDate>
<dc:creator>cyruslab</dc:creator>
<guid>http://cyruslab.net/2011/06/12/randomize_va_space-values/</guid>
<description><![CDATA[Kernel version cyrus@ubuntu:/$ uname -a Linux ubuntu 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:3]]></description>
<content:encoded><![CDATA[<p><strong>Kernel version</strong></p>
<pre>cyrus@ubuntu:/$ uname -a
Linux ubuntu 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
cyrus@ubuntu:/$ 

<strong>randomize_va_space default value</strong>
cyrus@ubuntu:/$ cat /proc/sys/kernel/randomize_va_space
2
cyrus@ubuntu:/$ 

<strong>randomize_va_space values</strong>
0: No randomization of address space.
1: Conservative address space randomization. Code start register will be randomized.
2: Full address space randomization. Contains the feature of value 1 in addition brk area is randomized.

<strong>Virtual memory</strong>
Each program will have exactly the same memory structure, making hardcoding of instruction and push the instruction to the fixed memory space easier.
With address space randomization, each execution of a program will be residing in different starting addresses. This makes hardcoding and pushing of hardcoded instruction to the predicted memory space harder.

<strong>Reference: <a href="http://www.kernel.org/pub/linux/kernel/people/jikos/randomization/brk-fix-2.patch">http://www.kernel.org/pub/linux/kernel/people/jikos/randomization/brk-fix-2.patch</a></strong></pre>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Things i do after I install Ubuntu 11.04]]></title>
<link>http://cyruslab.net/2011/06/12/things-i-do-after-i-install-ubuntu-11-04/</link>
<pubDate>Sat, 11 Jun 2011 20:09:34 +0000</pubDate>
<dc:creator>cyruslab</dc:creator>
<guid>http://cyruslab.net/2011/06/12/things-i-do-after-i-install-ubuntu-11-04/</guid>
<description><![CDATA[1. Update the distribution packages. sudo apt-get update &amp;&amp; sudo apt-get upgrade &nbsp; 2. I]]></description>
<content:encoded><![CDATA[<div>
<div>
<p>1. Update the distribution packages.</p>
<p>sudo apt-get update &#38;&#38; sudo apt-get upgrade</p>
<p>&#160;</p>
<p>2. Install flash player plugin. (youtube, xinmsn need flash player)</p>
<p>&#160;</p>
<div>
<div><img src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc6/252410_10150201559183231_509883230_7231744_1668_n.jpg" alt="" /></div>
</div>
<p>sudo apt-get install flashplugin-nonfree</p>
<p>&#160;</p>
<p>3. Install wireshark</p>
<p>&#160;</p>
<div>
<div><img src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/254139_10150201561123231_509883230_7231749_6010615_n.jpg" alt="" /></div>
</div>
<p>sudo apt-get install wireshark</p>
<p>&#160;</p>
<p>4. Install Chromium browser</p>
<p>&#160;</p>
<div>
<div><img src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc6/251149_10150201563033231_509883230_7231764_2004020_n.jpg" alt="" /></div>
</div>
<p>sudo apt-get install chromium-browser</p>
<p>&#160;</p>
<p>5. Install compiled IRPAS. (honestly compiling IRPAS is complicated&#8230;)</p>
<p>sudo apt-get install irpas</p>
<p>I just realised irpas was installed in Ubuntu&#8230;sweet.. so this the irpas in my system was upgraded to a later version..nice&#8230;in fedora core there&#8217;s no repo for irpas, if i want irpas i need to compile them&#8230;</p>
<p>&#160;</p>
<p>6. Install hexedit</p>
<p>You can choose to use the Gnome enabled Bless hexeditor if you like. I prefer to use hexedit as it is very small.</p>
<p>&#160;</p>
<div>
<div><img src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/260464_10150201570313231_509883230_7231842_4415638_n.jpg" alt="" /></div>
</div>
<p>&#160;</p>
<p>7. Install Azureus. (I dun like Transmission Bittorrent client which is included as a package in Ubuntu)</p>
<div>
<div><img src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc6/249984_10150201572358231_509883230_7231905_7760551_n.jpg" alt="" /></div>
</div>
<p>sudo apt-get install azureus</p>
<p>&#160;</p>
<p>8. Install putty! (my favourite <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> )</p>
<p>&#160;</p>
<div>
<div><img src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc6/247154_10150201577388231_509883230_7231983_6374790_n.jpg" alt="" /></div>
</div>
<p>sudo apt-get install putty</p>
<p>&#160;</p>
<p>9. Install ettercap and nmap</p>
<p>&#160;</p>
<div>
<div><img src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc6/249993_10150201578838231_509883230_7231989_7252958_n.jpg" alt="" /></div>
</div>
<p>sudo apt-get install ettercap nmap</p>
<p>Ubuntu repository is larger than Fedora! It has almost everything! In fedora I have to download the source code of ettercap and compile them!</p>
<p>&#160;</p>
<p>10. Download and install nessus.</p>
<p>Nessus used to be an open-source package, but after version 2 it is commercialized and cannot be included into linux distribution due to license issue. I downloaded the 64 bit from nessus.org</p>
<p>&#160;</p>
<div>
<div><img src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc6/260136_10150201584508231_509883230_7232035_6186309_n.jpg" alt="" /></div>
</div>
<p>i unpacked the deb package using dpkg -i command. After installed you need to register to use. Home use is free.</p>
<p>&#160;</p>
<p>11. Install virtualbox</p>
<p>Step 1: install dkms and gcc</p>
<p>&#160;</p>
<p>&#160;</p>
<div>
<div><img src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc6/253733_10150201588808231_509883230_7232060_8326901_n.jpg" alt="" /></div>
</div>
<p>sudo apt-get install dkms gcc</p>
<p>&#160;</p>
<p>Step 2: download virtual box</p>
<p>&#160;</p>
<div>
<div><img src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc6/252545_10150201589798231_509883230_7232067_6527642_n.jpg" alt="" /></div>
</div>
<p>use wget to download the deb file.</p>
<p>&#160;</p>
<p>Step 3: Unpack deb package</p>
<p>&#160;</p>
<div>
<div><img src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc6/247924_10150201595438231_509883230_7232160_3020549_n.jpg" alt="" /></div>
</div>
<p>You will receive dependencies errors.</p>
<p>&#160;</p>
<p>Step 4: Install virtual box with apt-get -f install, this way virtualbox dependencies will be installed together with virtualbox.</p>
<p>&#160;</p>
<div>
<div><img src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc6/253604_10150201596248231_509883230_7232170_3045468_n.jpg" alt="" /></div>
</div>
<p>&#160;</p>
<p><strong>If you do not install dkms and gcc first you will have problem starting dkms and virtualbox kernel.</strong></p>
<p><strong> </strong></p>
<div>
<div><img src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc6/250578_10150201597628231_509883230_7232172_3185675_n.jpg" alt="" /></div>
</div>
<p>&#160;</p>
<p>Step 5: Add user to user group vboxusers. If you do not add user to this group you cannot start your created vm.</p>
<p>command line:</p>
<p>cyrus@ubuntu:~/Downloads$ sudo usermod -G vboxusers -a cyrus</p>
<p>You can use GUI to help you to add user to group as well.</p>
<p>All Application &#62; System &#62; Users and groups</p>
<p>&#160;</p>
<div>
<div><img src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/247968_10150201600258231_509883230_7232182_5107578_n.jpg" alt="" /></div>
</div>
<p>&#160;</p>
<p>12. Install clamav antivirus.</p>
<p>Step 1: install clamav</p>
<p>&#160;</p>
<div>
<div><img src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc6/255747_10150201602028231_509883230_7232193_4682253_n.jpg" alt="" /></div>
</div>
<p>sudo apt-get install clamav</p>
<p>&#160;</p>
<p>Step 2: configure freshclam to do antivirus signature update.</p>
<p>cyrus@ubuntu:~/Downloads$ sudo gedit /etc/clamav/freshclam.conf</p>
<p>&#160;</p>
<div>
<div><img src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/246834_10150201604128231_509883230_7232202_2680377_n.jpg" alt="" /></div>
</div>
<p>Wow clamav seems to be optimized for Ubuntu, everything was pre-defined nicely! In fedora core I will have to manually configure freshclam.conf myself. Also clamav and freshclam are two seperate packages which i need to install in fedora core, but in Ubuntu installing clamav will also get freshclam <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>&#160;</p>
<p>Step 3: Update definition file.</p>
<p>&#160;</p>
<div>
<div><img src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc6/252939_10150201605748231_509883230_7232213_3898089_n.jpg" alt="" /></div>
</div>
<p>Wow even virus definition file is the latest! In fedora core I will have to do freshclam to update the latest definition file. No wonder Ubuntu is a favourite alternative for desktop computer, almost every nice packages are optimized for Ubuntu..</p>
</div>
</div>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Linux: Unable to take screenshot]]></title>
<link>http://cyruslab.net/2011/05/23/linux-unable-to-take-screenshot/</link>
<pubDate>Sun, 22 May 2011 16:18:43 +0000</pubDate>
<dc:creator>cyruslab</dc:creator>
<guid>http://cyruslab.net/2011/05/23/linux-unable-to-take-screenshot/</guid>
<description><![CDATA[This means gnome-utils package is not installed, if you are using Ubuntu/Backtrack use apt-get insta]]></description>
<content:encoded><![CDATA[<div id="attachment_1100" class="wp-caption aligncenter" style="width: 477px"><a href="http://cyruslab.files.wordpress.com/2011/05/gnome-screenshot.png"><img class="size-full wp-image-1100" title="gnome-screenshot" src="http://cyruslab.files.wordpress.com/2011/05/gnome-screenshot.png?w=467&#038;h=184" alt="" width="467" height="184" /></a><p class="wp-caption-text">This means gnome-utils package is not installed, if you are using Ubuntu/Backtrack use apt-get install gnome-utils. If you are using Fedora use yum install gnome-utils.</p></div>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Linux: Starting and stopping tftpd]]></title>
<link>http://cyruslab.net/2011/05/20/linux-starting-and-stopping-tftpd/</link>
<pubDate>Fri, 20 May 2011 02:08:16 +0000</pubDate>
<dc:creator>cyruslab</dc:creator>
<guid>http://cyruslab.net/2011/05/20/linux-starting-and-stopping-tftpd/</guid>
<description><![CDATA[Start tftp daemon root@bt:~# atftpd &#8211;daemon &#8211;port 69 /var/tmp Check if service is enable]]></description>
<content:encoded><![CDATA[<p><strong><span style="text-decoration:underline;">Start tftp daemon</span></strong></p>
<p>root@bt:~# <span style="color:#0000ff;"><strong>atftpd &#8211;daemon &#8211;port 69 /var/tmp</strong></span></p>
<p><strong><span style="text-decoration:underline;"><span style="color:#000000;">Check if service is enabled or not</span></span></strong></p>
<p>root@bt:~# <span style="color:#0000ff;"><strong>netstat -anup &#124;grep 69</strong></span><br />
udp        0      0 0.0.0.0:69              0.0.0.0:*                           1915/atftpd<br />
<strong></strong><br />
-a : listen all, -n : do not resolve numeric into names, show numeric only, -u : udp, -p  : process id of the service.</p>
<p><strong><span style="text-decoration:underline;">Stop tftpd with kill command</span></strong></p>
<p>root@bt:~# <strong><span style="color:#0000ff;">kill -9 1915</span></strong><br />
root@bt:~# <strong><span style="color:#0000ff;">netstat -anup &#124;grep 69</span></strong><br />
root@bt:~#<br />
-9: means kill that cannot be blocked. As you can see from netstat with filter, no open connection exists with source port 69 anymore.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Install Firefox4 on Fedora14]]></title>
<link>http://cyruslab.net/2011/05/15/install-firefox4-on-fedora14/</link>
<pubDate>Sat, 14 May 2011 20:18:01 +0000</pubDate>
<dc:creator>cyruslab</dc:creator>
<guid>http://cyruslab.net/2011/05/15/install-firefox4-on-fedora14/</guid>
<description><![CDATA[I love to use YUM to install application, however YUM is based on the repository to install applicat]]></description>
<content:encoded><![CDATA[<p>I love to use YUM to install application, however YUM is based on the repository to install application. Firefox4 is a new release which has no repository in <strong><span style="color:#00ccff;">/etc/yum.repos.d</span></strong></p>
<p>Here&#8217;s how I am going to save the URL into /etc/yum.repos.d so that YUM knows where to retrieve the repos and install firefox4.</p>
<p>You need to be a root user to perform this action, you can either login as root using the command<strong><span style="color:#0000ff;"> su -</span></strong> or you can use <strong><span style="color:#0000ff;">sudo</span></strong> as the prefix command. Using sudo will require sudoer rights.</p>
<p>Use your favourite text editor such as nano to edit the sudoers file in <strong><span style="color:#00ccff;">/etc/sudoers</span></strong>:</p>
<p><span style="color:#0000ff;"><strong>nano /etc/sudoers</strong></span></p>
<div id="attachment_1064" class="wp-caption aligncenter" style="width: 624px"><a href="http://cyruslab.files.wordpress.com/2011/05/sudoers.png"><img class="size-full wp-image-1064" title="sudoers" src="http://cyruslab.files.wordpress.com/2011/05/sudoers.png?w=614&#038;h=336" alt="" width="614" height="336" /></a><p class="wp-caption-text">Here I have allowed user cyrus to access all command just like a root user.</p></div>
<p>Next use <strong><span style="color:#0000ff;">wget</span></strong> to insert the URL and copy this into a repos file using <strong><span style="color:#0000ff;">wget -O</span></strong> option.</p>
<div id="attachment_1067" class="wp-caption aligncenter" style="width: 624px"><a href="http://cyruslab.files.wordpress.com/2011/05/repo1.png"><img class="size-full wp-image-1067" title="repo1" src="http://cyruslab.files.wordpress.com/2011/05/repo1.png?w=614&#038;h=107" alt="" width="614" height="107" /></a><p class="wp-caption-text">Insert the repo location and output to a new firefox4.repo file.</p></div>
<div id="attachment_1066" class="wp-caption aligncenter" style="width: 624px"><a href="http://cyruslab.files.wordpress.com/2011/05/remove-firefox.png"><img class="size-full wp-image-1066" title="remove-firefox" src="http://cyruslab.files.wordpress.com/2011/05/remove-firefox.png?w=614&#038;h=178" alt="" width="614" height="178" /></a><p class="wp-caption-text">Uninstall firefox version 3 track, choose Y to remove firefox.</p></div>
<div id="attachment_1068" class="wp-caption aligncenter" style="width: 624px"><a href="http://cyruslab.files.wordpress.com/2011/05/repo2.png"><img class="size-full wp-image-1068" title="repo2" src="http://cyruslab.files.wordpress.com/2011/05/repo2.png?w=614&#038;h=278" alt="" width="614" height="278" /></a><p class="wp-caption-text">Install firefox4, there&#039;s no need to enable repo.</p></div>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Install VirtualBox into Fedora 14]]></title>
<link>http://cyruslab.net/2011/05/13/install-virtualbox-into-fedora-14/</link>
<pubDate>Thu, 12 May 2011 16:51:07 +0000</pubDate>
<dc:creator>cyruslab</dc:creator>
<guid>http://cyruslab.net/2011/05/13/install-virtualbox-into-fedora-14/</guid>
<description><![CDATA[Finally I have installed and use VirtualBox successfully. Installation is easy, but when I was start]]></description>
<content:encoded><![CDATA[<p>Finally I have installed and use VirtualBox successfully. Installation is easy, but when I was starting the VDI I created a warning appeared:</p>
<p>[root@cyruslab yum.repos.d]# VirtualBox<br />
<span style="color:#ff0000;">WARNING: The vboxdrv kernel module is not loaded. Either there is no module</span><br />
<span style="color:#ff0000;">         available for the current kernel (2.6.35.13-91.fc14.i686.PAE) or it failed to</span><br />
<span style="color:#ff0000;">         load. Please recompile the kernel module and install it by</span></p>
<p><span style="color:#ff0000;">           sudo /etc/init.d/vboxdrv setup</span></p>
<p><span style="color:#ff0000;">         You will not be able to start VMs until this problem is fixed.</span></p>
<p>This is resolved by adding user to the user group vboxusers. Without adding a user to this vboxusers group the Kernel will not start and hence the VDI I created will not start as well.</p>
<p>vboxusers is a group created by VirtualBox itself after installation.</p>
<p>To add user use this command:</p>
<p>Step 1: <strong><span style="color:#0000ff;">su -</span></strong></p>
<p>Login to root.</p>
<p>Step 2: <strong><span style="color:#0000ff;">usermod -a -G vboxusers cyrus</span></strong></p>
<p>this statement means to add user cyrus into group vboxusers.</p>
<p><strong><span style="text-decoration:underline;">Steps to install Virtual Box and use it.</span></strong></p>
<p>Step 1: <strong><span style="color:#0000ff;">su -</span></strong></p>
<p>Login to root user.</p>
<p>Step 2: <strong><span style="color:#0000ff;">cd /etc/yum.repos.d/</span></strong></p>
<p>Go to the directory of the yum repository. In here you need to include the virtual box repository from virtual box website.</p>
<p>Step 3:<strong><span style="color:#0000ff;"> wget <a href="http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo" rel="nofollow">http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo</a></span></strong></p>
<p>You need to download this repository from the virtual box website, this repository tells your YUM where to download and install Virtualbox. Without this step you will need to go to Virtual box yourself and download and install it.</p>
<p>Step 4: <strong><span style="color:#0000ff;">yum install dkms gcc</span></strong></p>
<p>dkms and gcc packages need to be installed and updated.</p>
<p>Step 5:<strong><span style="color:#0000ff;"> yum install VirtualBox-4.0</span></strong></p>
<p>This will download and install VirtualBox from the website as informed by the repo file. The package name &#8211; VirtualBox-4.0 is case sensitive!</p>
<p>Step 6:<strong><span style="color:#0000ff;"> usermod &#8211; a -G vboxusers &#60;your username&#62;</span></strong></p>
<p>Now you can run virtual box, create virtual machine and start it without warning!</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Linux: Setting up tftp server]]></title>
<link>http://cyruslab.net/2011/02/03/linux-setting-up-tftp-server/</link>
<pubDate>Thu, 03 Feb 2011 15:50:48 +0000</pubDate>
<dc:creator>cyruslab</dc:creator>
<guid>http://cyruslab.net/2011/02/03/linux-setting-up-tftp-server/</guid>
<description><![CDATA[Configuring tftpd in linux is really a pain in my neck&#8230;lol&#8230; Thanks Andrey for helping me]]></description>
<content:encoded><![CDATA[<p>Configuring tftpd in linux is really a pain in my neck&#8230;lol&#8230;</p>
<p>Thanks Andrey for helping me to rectify the problem remotely.</p>
<p>The main problem with my linux configuration was the credential denied my router from executing commands to linux tftpd.</p>
<p><strong><span style="text-decoration:underline;">Understanding chmod</span></strong></p>
<p><strong>ch</strong>ange <strong>mod</strong>e is the command that change the rights of user, group and/or other.</p>
<p>The binary is like a three buttoned dip switch:</p>
<p>Execute = 001 = 1 in decimal</p>
<p>write = 010 = 2 in decimal</p>
<p>read = 100 = 4 in decimal</p>
<p><strong><span style="text-decoration:underline;">The combinations:</span></strong></p>
<p>no write, no read and no execute = 000 = 0</p>
<p>read, no write and no execute = 100 = 4</p>
<p>read, write and no execute = 100 + 010 + 000 = 110 = 6</p>
<p>read, write and execute = 100 + 010 + 001 = 111 = 7</p>
<p>no read, no write, execute = 001 = 1</p>
<p>no read, write and execute = 000 + 010 + 001 = 011 = 3</p>
<p>read, no write and execute = 100 + 000 + 001 = 101 = 5</p>
<p><strong><span style="text-decoration:underline;">chmod options</span></strong></p>
<p>Based on the combinations above, interpret the meaning of chmod options</p>
<p>where r = read, w = write and x = execute files and/or search directories</p>
<p>Example 1: chmod 755</p>
<p>Means: User rwx, group and other rx</p>
<p>[root@cyruslab /]# ls -l /usr/sbin/in.tftpd<br />
<strong>-rwxr-xr-x</strong> 1 root root 32688 Jan  3 23:01 /usr/sbin/in.tftpd</p>
<p>Example 2: chmod 777</p>
<p>Means: user, group and other rwx</p>
<p>Example 3: chmod 666</p>
<p>Means: user, group and other rw</p>
<p><strong><span style="text-decoration:underline;">chmod option representation</span></strong></p>
<p>Example: chmod <strong><span style="color:#0000ff;">7</span><span style="color:#339966;">7</span><span style="color:#ff0000;">7</span><span style="text-decoration:underline;"> </span></strong></p>
<p><span style="color:#000000;">chmod <strong><span style="color:#0000ff;">user <span style="color:#008000;">group <span style="color:#ff0000;">other</span></span></span></strong></span></p>
<p><span style="color:#000000;"><span style="color:#0000ff;"><span style="color:#008000;"><span style="color:#ff0000;"><span style="color:#000000;"><strong><span style="text-decoration:underline;">Modify tftp configuration</span></strong></span></span></span></span></span></p>
<p style="text-align:center;"><span style="color:#000000;"><span style="color:#0000ff;"><span style="color:#008000;"><span style="color:#ff0000;"><span style="color:#000000;"><strong><span style="text-decoration:underline;"> </span></strong></span></span></span></span></span></p>
<div id="attachment_825" class="wp-caption aligncenter" style="width: 624px"><strong><a href="http://cyruslab.files.wordpress.com/2011/02/tftp.png"><img class="size-full wp-image-825 " title="tftp" src="http://cyruslab.files.wordpress.com/2011/02/tftp.png?w=614&#038;h=367" alt="" width="614" height="367" /></a></strong><p class="wp-caption-text">Login as root.  Then type gedit /etc/xinetd.d/tftp. Default is disable = yes, change to no and save the configuration.</p></div>
<p><strong> </strong></p>
<p style="text-align:left;">For server_args I have changed to server_args = -s /tftpboot, I have made a directory in root &#8220;/&#8221; using <span style="color:#0000ff;"><strong>mkdir /tftpboot</strong></span>. Note in this configuration file the user is root. After the configuration was saved, restart the service:</p>
<p style="text-align:left;"><span style="color:#0000ff;"><strong>service xinetd restart</strong></span></p>
<p style="text-align:left;">tftp depends on xinetd, however tftp can run as standalone.</p>
<p style="text-align:left;">Verify the service by using:</p>
<p style="text-align:left;">[root@cyruslab ~]# <strong><span style="color:#0000ff;">chkconfig &#8211;list tftp</span></strong><br />
tftp               on</p>
<p style="text-align:left;">From the Linux window, go to System &#62; Administration &#62; Firewall, turn on the tftp as shown in this screenshot.</p>
<p style="text-align:left;">&#160;</p>
<div id="attachment_826" class="wp-caption aligncenter" style="width: 624px"><a href="http://cyruslab.files.wordpress.com/2011/02/firewall.png"><img class="size-full wp-image-826" title="firewall" src="http://cyruslab.files.wordpress.com/2011/02/firewall.png?w=614&#038;h=429" alt="" width="614" height="429" /></a><p class="wp-caption-text">There&#039;s a cli for iptables which is very complicated...lol</p></div>
<p><span style="color:#0000ff;"><span style="color:#008000;"><span style="color:#ff0000;"> </span></span></span></p>
<p style="text-align:left;">&#160;</p>
<p><span style="color:#000000;"><span style="color:#0000ff;"><span style="color:#008000;"><span style="color:#ff0000;"><span style="color:#000000;"> </span></span></span></span></span></p>
<p style="text-align:left;"><strong><span style="text-decoration:underline;">Make tftp ready to be used by external host</span></strong></p>
<p style="text-align:left;">[root@cyruslab ~]# <span style="color:#0000ff;"><strong>touch /tftpboot</strong></span><br />
[root@cyruslab ~]# <span style="color:#0000ff;"><strong>chmod 777 /tftpboot</strong></span></p>
<p><span style="color:#0000ff;"><span style="color:#008000;"><span style="color:#ff0000;"> </span></span></span></p>
<p style="text-align:left;"><span style="color:#000000;">Cisco router is not a root user, it belongs to <strong>other</strong> category which is the last digit, so these combinations can be used:</span></p>
<p style="text-align:left;"><span style="color:#000000;">1. chmod 757 /tftpboot</span></p>
<p style="text-align:left;"><span style="color:#000000;">2. chmod 707 /tftpboot</span></p>
<p style="text-align:left;"><span style="color:#000000;"><strong><span style="text-decoration:underline;">Test with router</span></strong></span></p>
<p style="text-align:left;"><span style="color:#000000;">2651-1#copy run tftp</span><br />
<span style="color:#000000;">Address or name of remote host []? 192.168.1.107</span><br />
<span style="color:#000000;">Destination filename [2651-1-confg]? </span><br />
<span style="color:#000000;">!! </span><br />
<span style="color:#000000;">2103 bytes copied in 2.275 secs (924 bytes/sec)</span></p>
<p style="text-align:left;"><span style="color:#000000;"><strong>[root@cyruslab ~]# cd /tftpboot</strong></span><br />
<span style="color:#000000;"><strong>[root@cyruslab tftpboot]# ls</strong></span><br />
<span style="color:#000000;"><strong>2651-1-confg  cisco</strong></span><br />
<span style="color:#000000;"><strong>[root@cyruslab tftpboot]# </strong></span></p>
<p><span style="color:#000000;"><span style="color:#0000ff;"><span style="color:#008000;"><span style="color:#ff0000;"><span style="color:#000000;"><strong><span style="text-decoration:underline;"> </span></strong></span></span></span></span></span></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Linux: Start tftp-server]]></title>
<link>http://cyruslab.net/2011/01/29/linux-start-tftp-server/</link>
<pubDate>Sat, 29 Jan 2011 07:29:49 +0000</pubDate>
<dc:creator>cyruslab</dc:creator>
<guid>http://cyruslab.net/2011/01/29/linux-start-tftp-server/</guid>
<description><![CDATA[Find the tftp file in /etc/xinetd.d/ [root@cyruslab ~]# cd / [root@cyruslab /]# ls bin  boot  cgroup]]></description>
<content:encoded><![CDATA[<p><strong><span style="text-decoration:underline;">Find the tftp file in /etc/xinetd.d/<br />
</span></strong></p>
<p>[root@cyruslab ~]# cd /<br />
[root@cyruslab /]# ls<br />
bin  boot  cgroup  dev  etc  home  lib  lost+found  media  mnt  null  opt  proc  root  sbin  selinux  srv  sys  tmp  usr  var</p>
<p><strong><span style="text-decoration:underline;">Use a text editor to edit the configuration</span></strong></p>
<p>[root@cyruslab /]# gedit /etc/xinetd.d/tftp</p>
<p><strong><span style="text-decoration:underline;">Change from disable = yes to disable = no</span></strong></p>
<p><strong><span style="text-decoration:underline;"></p>
<div id="attachment_804" class="wp-caption aligncenter" style="width: 624px"><a href="http://cyruslab.files.wordpress.com/2011/01/tftpd-confg.png"><img class="size-full wp-image-804" title="tftpd-confg" src="http://cyruslab.files.wordpress.com/2011/01/tftpd-confg.png?w=614&#038;h=370" alt="" width="614" height="370" /></a><p class="wp-caption-text">Change disable = yes to no.</p></div>
<p></span></strong></p>
<p>&#160;</p>
<p><strong><span style="text-decoration:underline;">Activate the tftpd</span></strong></p>
<p>A program known as service is found in /sbin directory.</p>
<div id="attachment_805" class="wp-caption aligncenter" style="width: 624px"><a href="http://cyruslab.files.wordpress.com/2011/01/xinetd1.png"><img class="size-full wp-image-805" title="xinetd1" src="http://cyruslab.files.wordpress.com/2011/01/xinetd1.png?w=614&#038;h=79" alt="" width="614" height="79" /></a><p class="wp-caption-text">xinetd service can also be started by issuing /sbin/service xinetd start from /. Stopping the service is the same, /sbin/service xinetd stop</p></div>
<p>&#160;</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Fedora Linux: Installing tftp client and server]]></title>
<link>http://cyruslab.net/2011/01/29/fedora-linux-installing-tftp-client-and-server/</link>
<pubDate>Sat, 29 Jan 2011 07:03:38 +0000</pubDate>
<dc:creator>cyruslab</dc:creator>
<guid>http://cyruslab.net/2011/01/29/fedora-linux-installing-tftp-client-and-server/</guid>
<description><![CDATA[Installing tftp client: [root@cyruslab ~]# yum install tftp &nbsp; Installing the tftp daemon: [root]]></description>
<content:encoded><![CDATA[<p>Installing tftp client:</p>
<p>[root@cyruslab ~]# <strong>yum install tftp</strong></p>
<p>&#160;</p>
<p>Installing the tftp daemon:</p>
<p>[root@cyruslab ~]# <strong>yum install tftp-server</strong></p>
<p>&#160;</p>
<p>Installation is a pain without yum&#8230;:D</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Linux: Give user root privilege in /etc/sudoers]]></title>
<link>http://cyruslab.net/2011/01/29/linux-give-user-root-privilege-in-etcsudoers/</link>
<pubDate>Sat, 29 Jan 2011 05:13:31 +0000</pubDate>
<dc:creator>cyruslab</dc:creator>
<guid>http://cyruslab.net/2011/01/29/linux-give-user-root-privilege-in-etcsudoers/</guid>
<description><![CDATA[Linux is a very secure system&#8230; Almost everything that involves changes will need you to be a r]]></description>
<content:encoded><![CDATA[<p>Linux is a very secure system&#8230; Almost everything that involves changes will need you to be a root user.</p>
<p>If you do not escalate yourself to be root user you will see this error:</p>
<p>[cyrus@cyruslab ~]$ sudo minicom<br />
[sudo] password for cyrus:<br />
<span style="color:#ff0000;"><strong>cyrus is not in the sudoers file.  This incident will be reported.</strong></span></p>
<p>An email will be sent to the admin&#8230;;) cool eh?</p>
<p>&#160;</p>
<p><strong><span style="text-decoration:underline;"><span style="color:#000000;">Add my account into sudoers to enjoy the same privilege as root user</span></span></strong></p>
<p>[root@cyruslab ~]# <strong><span style="color:#000000;">gedit /etc/sudoers</span></strong></p>
<p>gedit is a gui text editor, some people use vi which is a text-based text editor, vi is very difficult to use!!</p>
<p>&#160;</p>
<div id="attachment_798" class="wp-caption aligncenter" style="width: 624px"><a href="http://cyruslab.files.wordpress.com/2011/01/sudoers.png"><img class="size-full wp-image-798" title="sudoers" src="http://cyruslab.files.wordpress.com/2011/01/sudoers.png?w=614&#038;h=424" alt="" width="614" height="424" /></a><p class="wp-caption-text">I have highlighted the portion that i was adding.</p></div>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Fedora Linux: How to console into your Cisco router]]></title>
<link>http://cyruslab.net/2011/01/29/fedora-linux-how-to-console-into-your-cisco-router/</link>
<pubDate>Fri, 28 Jan 2011 18:49:13 +0000</pubDate>
<dc:creator>cyruslab</dc:creator>
<guid>http://cyruslab.net/2011/01/29/fedora-linux-how-to-console-into-your-cisco-router/</guid>
<description><![CDATA[This is my first attempt using Linux, and I am going to start learning Linux uing Fedora Linux My fi]]></description>
<content:encoded><![CDATA[<p>This is my first attempt using Linux, and I am going to start learning Linux uing Fedora Linux <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>My first attempt is to learn how to use Linux environment to console into my cisco routers like I am doing in Windows with PuTTY.</p>
<p>There are two softwares I found in Linux that can do virtual console terminal. A text based one &#8211; minicom. A GUI one &#8211; CuteCom.</p>
<p>For some reason I could not make Cutecom open a tty session, however I have made it possible with minicom <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><strong><span style="text-decoration:underline;">Verify serial port status</span></strong></p>
<p>First thing is to identify which tty is associated with my serial com port:</p>
<p>[cyrus@cyruslab ~]$ dmesg &#124;grep ttyS<br />
[    2.266367] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A<br />
[    2.511359] serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A<br />
[    2.512365] 00:09: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A<br />
[    2.513144] 00:0a: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A<br />
[cyrus@cyruslab ~]$</p>
<p>&#160;</p>
<p><strong><span style="text-decoration:underline;">Install the minicom package</span></strong></p>
<p>From the panel click:</p>
<p>System &#62; Administration &#62; Add/Remove Software</p>
<p>Search for minicom.</p>
<div id="attachment_789" class="wp-caption aligncenter" style="width: 624px"><a href="http://cyruslab.files.wordpress.com/2011/01/install-scrn.png"><img class="size-full wp-image-789" title="install-scrn" src="http://cyruslab.files.wordpress.com/2011/01/install-scrn.png?w=614&#038;h=460" alt="" width="614" height="460" /></a><p class="wp-caption-text">Click on minicom and click apply, you will be prompted to login as root user.</p></div>
<p><strong><span style="text-decoration:underline;">Configuring minicom</span></strong></p>
<p>[cyrus@cyruslab ~]$ minicom -s</p>
<p>root user is needed to make changes to the configuration.</p>
<p>[cyrus@cyruslab ~]$ su -<br />
Password:<br />
[root@cyruslab ~]#</p>
<div id="attachment_791" class="wp-caption aligncenter" style="width: 624px"><a href="http://cyruslab.files.wordpress.com/2011/01/minicom-serial-setup1.png"><img class="size-full wp-image-791" title="minicom-serial-setup" src="http://cyruslab.files.wordpress.com/2011/01/minicom-serial-setup1.png?w=614&#038;h=428" alt="" width="614" height="428" /></a><p class="wp-caption-text">Choose Serial Port setup as shown</p></div>
<p>&#160;</p>
<p style="text-align:center;">&#160;</p>
<div id="attachment_792" class="wp-caption aligncenter" style="width: 624px"><a href="http://cyruslab.files.wordpress.com/2011/01/minicom-serial-setup2.png"><img class="size-full wp-image-792 " title="minicom-serial-setup2" src="http://cyruslab.files.wordpress.com/2011/01/minicom-serial-setup2.png?w=614&#038;h=429" alt="" width="614" height="429" /></a><p class="wp-caption-text">Go to option E, set the Baud rate as shown in the screenshot. Go to option A and type /dev/ttyS0 as shown in screenshot. The ttyS0 is found in dmesg &#124;grep ttyS</p></div>
<p>&#160;</p>
<p><strong><span style="text-decoration:underline;">Use minicom to console to router</span></strong></p>
<p>[root@cyruslab ~]# sudo minicom</p>
<div id="attachment_793" class="wp-caption aligncenter" style="width: 624px"><a href="http://cyruslab.files.wordpress.com/2011/01/tserver.png"><img class="size-full wp-image-793" title="tserver" src="http://cyruslab.files.wordpress.com/2011/01/tserver.png?w=614&#038;h=427" alt="" width="614" height="427" /></a><p class="wp-caption-text">I&#039;m in <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  This is the term server screen <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  yay!</p></div>
<p><strong><span style="text-decoration:underline;">Terminate minicom session</span></strong></p>
<p>DO NOT just close the terminal window, the ttyS0 session is still alive! If you did that, kill the ttyS0 session by using:</p>
<p>[root@cyruslab ~]#<strong> killall minicom</strong></p>
<p>Be sure you are a root user, a lot of privileges only availabe for root user. The command <strong>killall</strong> is only available for root user.</p>
<p>To properly terminate the minicom session, press CTRL + A, then press X, a prompt will appear to confirm whether you really need to exit minicom or not.</p>
<p>&#160;</p>
<p>Thanks Andrey for the guidance <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>&#160;</p>
]]></content:encoded>
</item>

</channel>
</rss>
