Archive for the ‘Linux’ Category

Be careful so do a backup of the snmpd config file.

[root@linux ~]# mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.org

Create a new config file.

[root@linux ~]# nano /etc/snmp/snmpd.conf
rocommunity  public IPMonitorServer
syslocation  "Webserver, WAPNET"
syscontact  some@email.com

Start the snmpd service and set the snmp stratup at boot on

[root@linux ~]# /etc/init.d/snmpd start
[root@linux ~]# chkconfig snmpd on

Locate is a great unix/linux util that you can use for fast file searching.

enable locate (search command database) this takes 10 minutes the first ime. But it is a background process.

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist

Updatedb (search db)

sudo /usr/libexec/locate.updatedb

find a specific file

locate file

I have an HTC Desire phone. I like the phone but there is one big problem; the NAND (internal storage) is way to small. I installed a lot of ROM’s but the last time I install Cyanogenmod 7.1 with the “Launcher 7″ and I did a lot of customization I don’t want to reinstall my phone.

There is an crappy android workaround to move some of your apps to the SD card but when you connect/mount your phone to your pc you cannot start these apps and if you disconnect some of the settings are ruined.

So I searched the internet and read a lot of articles to find the best method to repartition my SD card and move the application and dalvik cache to my SD card. So I wrote this tutorial so you can move all the apps to your phone without any data loss also.

What do you need:

  1. Cyanogenmod 7
  2. S2E (free on the android marked)
  3. App 2 SD free (android marked)
  4. Linux operating system with Gparted or Gparted live CD

The steps

  1. Shutdown the phone and put out your SD card
  2. Make a backup of your SD card
  3. Run GParted and make a primary FAT32 partiton and 1 GB (or more) EXT3 partition. Because I have an 16GB SD card I make a 2GB EXT3 partition. You can check a Gparted youtube tutorial here: http://www.youtube.com/watch?v=6z1Tu9l8WNc
  4. Now copy your backup back to the SD card and place the SD in to the phone
  5. Start the phone and start S2E
  6. Select Applications, Dalvik cache and Download cache
  7. Press the menu button and reboot the phone
  8. Have some patience now (5min-10min)
  9. Now start the phone and start apps 2 sd
  10. Press the “On SD Card” tab, press menu and press move all apps
  11. Now press on the move to phone button for every app you haved placed to the SD card.

Because  you have place the /data/app folder to the EXT3 partition (/sd-ext/app) you do not move the app to your phone but to your EXT3 partition :)

If this article helps you, please leave a comment below :)

tar czvf backup.tar.gz somefoldername/

YUMI (Your Universal Multiboot Installer), is the successor to MultibootISOs. It can be used to create a Multiboot USB Flash Drive containing multiple operating systems, antivirus utilities, disc cloning, diagnostic tools, and more. Contrary to MultiBootISO’s which used grub to boot ISO files directly from USB, YUMI uses syslinux to boot extracted distributions stored on the USB device, and reverts to using grub to Boot Multiple ISO files from USB, if necessary.

Aside from a few distributions, all files are stored within the Multiboot folder, making for a nicely organized Multiboot Drive that can still be used for other storage purposes.

 

Creating a YUMI Multiboot MultiSystem USB Flash Drive
YUMI works much like Universal USB Installer, except it can be used to install more than one distribution to run from your USB. Distributions can also be uninstalled using the same tool!

 

YUMI’s Main Multiboot Boot Menu

 

How to Create a MultiBoot USB Flash Drive

  1. Run* YUMI-0.0.2.9.exe following the onscreen instructions
  2. Run the tool again to Add More ISOs/Distributions to your Drive
  3. Restart your PC setting it to boot from the USB device
  4. Select a distribution to Boot from the Menu and enjoy!

That’s all there is to it. You should now be booting your favorite distributions from your custom Multi-Boot USB device!

How It Works: YUMI (Your Universal Multiboot Installer) enables each user to create their own custom Multiboot UFD containing only the distributions they want, in the order by which they are installed. A new distribution can be added to the UFD each time the tool is run.

If you run YUMI from the same location you store ISO downloads, they should be auto-detected (*See Known Issues Below), eliminating the need to browse for each ISO.

VERY IMPORTANT: Windows Vista or 7 Installers will cause Ubuntu or any remix based on Ubuntu (I.E. Linux Mint) to hang during boot. A quick fix is to temporarily rename the Windows SOURCES folder found at the root of the USB device.

Other Notes: If MultibootISOs was previously used, you must reformat the drive and start over. YUMI uses Syslinux directly, and chainloads to grub only if necessary, so it is not compatible with the older Multiboot ISO tool. Although I do plan to add back the capabilities of MultibootISOs as time permits.

The distro uninstaller works great, but unlisted ISO’s that have been added must currently be manually removed!

Source: http://www.pendrivelinux.com/yumi-multiboot-usb-creator/

One of the worst things you can do on the internet is use the same password for different websites. When one of the webites is hacked or there is an bad sysadmin they can use your password to login your email or other sites to steal all your private information and worst case scenario your bank account.

Every self respected browser has an built-in password safer but when your computer/laptop is stolen or hacked by a mad person (in dutch we call them klootzakken ;) ) they can easily steal all your passwords. So don’t use the built-in password safer (or configure a strong master password).

There are two great solutions for managing your passwords. One is a local and one is a cloud solution. I will describe them both so you can choose what is best for you.

KeePass (local):
KeePass is a great tool for managing your passwords. There is an built-in password generator, the passwords saved in one local encrypted file and you must always give up a master key to access the passwords. The tool is crossplatform (using .net/mono) and there are a lot of plugins, example; there is a browser plugin to replace the insecure built-in pass safer. The great thing about this tool is that is is an local tool so only you can access and manage the password files. If you want to share the password file on multiple places you can use dropbox to synchronise/centralise the password files.

LastPass (cloud):
LastPass is also a great tool for managing your password especialy when you use multiple computers and different operating systems. LastPass replaces the default integrated browser password safer with his own. Your password stored localy and in the cloud and are encrypted. Without the master password it is not possible to automatic login or see your password. I like LastPass because tons of options and integration with all the operating systems and smartphones. The default settings are good but I recommend that you change the setting that the LastPass is logoff automaticly when you close the browser.

The only thing you must keep in mind that you password is in sync at LastPass (cloud) so you must trust the company.

Keep in mind
That using multiple random words password (example: “correct battery horse staple”) mostly of the time is better then using complex passwords (“Tr0ub4dor&3″). This picture tells why:

Last but not least
Always
use a BIOS password on a laptop. Most of the thief’s are very dumb people and if they stole you laptop they cannot remove the BIOS password and your laptop is useless for them.

There is a very nice opensource / freeware tool you can use to control multiple PC’s like KVM. It’s compatible with Linux, OSX and Windows.

Quote:

What is Synergy?

Do you have two computers at your desk, with two screens and two sets of keyboard and mouse? Here’s where Synergy comes in…

Synergy is Free and Open Source Software that lets you easily share your mouse and keyboard between multiple computers, where each computer has its own display. No special hardware is required, just a network connection. Synergy is supported on Windows, Mac OS X and Linux. Usage is as simple as moving the mouse off the edge of your screen. You can even share your clipboard.

Download: http://synergy-foss.org/download/

The solutions is block the rt2800usb

 echo ‘blacklist rt2800usb’ | sudo tee -a /etc/modprobe.d/blacklist.conf

restart, and try this

echo ‘install rt2870sta modprobe –ignore-install rt2870sta ; /bin/echo “0df6 0040″ > /sys/bus/usb/drivers/rt2870/new_id’ | sudo tee /etc/modprobe.d/rt2870sta.conf
sudo modprobe rt2870sta
dmesg | egrep ‘rt28|usb|Phy’
iwconfig
sudo iwlist scan

 

(the first Line allocate the Chipset-ID to the driver rt2870sta)

If the solution works, activiate it automatically by a new udev-Rule

sudo gedit /etc/udev/rules.d/10-wlan.rules

Insert the following code and save the file

 # UDEV-Rule for Sitecom WL-344 ID 0df6:0040

SUBSYSTEM==”usb”, SYSFS{idVendor}==”0df6″, SYSFS{idProduct}==”0040″, RUN+=”/sbin/modprobe rt2870sta”

Activate it (or restart)

 sudo service udev reload

Credits: flash63
Source: http://ubuntuforums.org/showthread.php?t=1514196

All the credits go to Arjen Visser @ http://www.dbvisit.com/forums/showthread.php?t=343. I add his article to my blog to find it quickly the next time :)
Here is the current file system. It needs another 3Gb on the LogVol00 filesystem. The Linux system is a VMware virtual system with Virtual disks.

[root@dbvrac1 ~]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
9127580 6692828 1971088 78% /
/dev/sda1 101086 12651 83216 14% /boot
none 596544 0 596544 0% /dev/shm

The partitions are as follows

[root@dbvrac1 ~]# sfdisk -s
/dev/sda: 10485760
/dev/sdb: 10485760
/dev/sdc: 10485760
/dev/sdd: 10485760
/dev/sde: 10485760
/dev/sdf: 10485760

First the Vmware virtual disks needs to increase. 13Gb is the new size. Shutdown the Vmware guest and resize the disk on the Vmware host:

# vmware-vdiskmanager -x 13GB dbvrac1.vmdk
Using log file /tmp/vmware-root/vdiskmanager.log
The old geometry C/H/S of the disk is: 1305/255/63
The new geometry C/H/S of the disk is: 1697/255/63
Disk expansion completed successfully.

Start up the Vmware guest again.
This has added space on the /dev/sda partition. This can be seen by running sfdisk -s again:

[root@dbvrac1 ~]# sfdisk -s
/dev/sda: 13631488
/dev/sdb: 10485760
/dev/sdc: 10485760
/dev/sdd: 10485760
/dev/sde: 10485760
/dev/sdf: 10485760

To use the space, a partition first has to be created on /dev/sda

[root@dbvrac1 ~]# ls -al /dev/sda*
brw-rw—- 1 root disk 8, 0 Jun 29 2009 /dev/sda
brw-rw—- 1 root disk 8, 1 Jun 29 2009 /dev/sda1
brw-rw—- 1 root disk 8, 2 Jun 29 2009 /dev/sda2

The new partition will be /dev/sda3.

[root@dbvrac1 /]# fdisk /dev/sda

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (1306-1697, default 1306):
Using default value 1306
Last cylinder or +size or +sizeM or +sizeK (1306-1697, default 1697):
Using default value 1697

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
Validate that the new partition has been created

[root@dbvrac1 ~]# ls -al /dev/sda*
brw-rw—- 1 root disk 8, 0 Jun 29 2009 /dev/sda
brw-rw—- 1 root disk 8, 1 Jun 29 2009 /dev/sda1
brw-rw—- 1 root disk 8, 2 Jun 29 2009 /dev/sda2
brw-rw—- 1 root disk 8, 2 Jun 29 2009 /dev/sda3

/dev/sda3 is the new partition.
Reboot to load the new partition into the kernel.Create a physical volume for LVM:

[root@dbvrac1 ~]# pvcreate /dev/sda3
Physical volume “/dev/sda3″ successfully created

Add the new physical volume to the volume group:

[root@dbvrac1 ~]# vgextend VolGroup00 /dev/sda3
Volume group “VolGroup00″ successfully extended

Extend the logical volume over the new space in the volume group.
Find out how much more space can be added:

[root@dbvrac1 ~]# vgdisplay
— Volume group —
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 2
Act PV 2
VG Size 12.88 GB
PE Size 32.00 MB
Total PE 412
Alloc PE / Size 315 / 9.84 GB
Free PE / Size 97 / 3.03 GB
VG UUID 7yenoW-lzsd-xK8a-j2Vj-qgty-TFXK-L0lhTL

There is 3.03Gb available.
Extend the volume:

[root@dbvrac1 ~]# lvextend -L+3.03G /dev/VolGroup00/LogVol00
Rounding up size to full physical extent 3.03 GB
Extending logical volume LogVol00 to 11.88 GB
Logical volume LogVol00 successfully resized

Resize the filesystem:

[root@dbvrac1 ~]# resize2fs /dev/VolGroup00/LogVol00
resize2fs 1.35 (28-Feb-2004)
/dev/VolGroup00/LogVol00 is mounted; can’t resize a mounted filesystem!

Cannot use resize2fs as it is online. Use ext2online instead.

[root@dbvrac1 ~]# ext2online /dev/VolGroup00/LogVol00
ext2online v1.1.18 – 2001/03/18 for EXT2FS 0.5b

Check file system:

[root@dbvrac1 ~]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
12256820 6695112 4940796 58% /
/dev/sda1 101086 12651 83216 14% /boot
none 596544 0 596544 0% /dev/shm

All done! Filesystem has increased from 9127580 to 12256820.

Original article: http://www.dbvisit.com/forums/showthread.php?t=343

There is a very nice GUI tool to troubeshoot webinject scripts. You can download the tool @ http://www.webinject.org/download.html for Windows and Linux.

After you extract or install the tool you can change the globalhttplog line in the config.xml file to: <globalhttplog>yes</globalhttplog> so you get the full debug log.

Note: I found a small memory bug in the GUI when you use the parseresponse parameter in your scripts. To workaround this issue the best you can do is restart the tool (file > restart) before you test the scripts.

Switch to our mobile site