Thursday, October 22, 2015

How To Enable CentOS 6 x64 EPEL Repository

This tutorial is made for CentOS 6 x86_64. You can find another version, just browse the website.

rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
Don't forget to update your ca-certificate ...
sudo yum upgrade ca-certificates --disablerepo=epel

Wednesday, October 7, 2015

Repository Kali Linux -> OpenIXP

#KALI Linux Repository from Hacker Indonesia
deb http://mirror.kali.indonesianhacker.or.id/kali kali main contrib non-free
deb-src http://mirror.kali.indonesianhacker.or.id/kali kali main contrib non-free
deb http://mirror.kali.indonesianhacker.or.id/kali-security kali/updates main contrib non-free
deb-src http://mirror.kali.indonesianhacker.or.id/kali-security kali/updates main contrib non-free

Monday, December 22, 2014

How to install software or upgrade from an old unsupported release?

The repositories for older releases that are not supported (like 11.04, 11.10 and 13.04) get moved to an archive server. There are repositories available at http://old-releases.ubuntu.com
The reason for this is that it is now out of support and no longer receiving updates and security patches.
I would urge you to consider a supported distribution. If your computer is too old in terms of memory or processor then you should consider a distribution such as Lubuntu or Xubuntu.
If you want to continue using an outdated release then edit /etc/apt/sources.list and change archive.ubuntu.com to old-releases.ubuntu.com
You can do this with sed
sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
then update with
sudo apt-get update && sudo apt-get dist-upgrade
Sometimes, it might be faster to create backups of your system and reinstall using supported release instead.
source

To upgrade to a new release:

Once you have performed the above steps to switch to the old-releases mirrors, update the Update Manager and then do do-release-upgrade:
sudo apt-get update
sudo apt-get install update-manager-core
sudo do-release-upgrade
 
Source : http://askubuntu.com/questions/91815/how-to-install-software-or-upgrade-from-an-old-unsupported-release 

Managing Volume Groups

LVM – Volume Group Management on CentOS 6

LVM quickly explained:

In computer storage, logical volume management or LVM provides a method of allocating space on mass-storage devices that is more flexible than conventional partitioning schemes. In particular, a volume manager can concatenate, stripe together or otherwise combine partitions into larger virtual ones that administrators can re-size or move, potentially without interrupting system use.
As seen in the LVM design scheme, Physical Volumes (PV) are the bottom layer of LVM. The second layer are Volume Groups (VG) and the final, third layer are Logical Volumes (LV). In Part 1 (LVM – Physical Volume Management on CentOS 6) we learned how to manage PV’s and already prepared PV’s to be added to Volume Groups (VG’s). This example is continuation of Part 1 (LVM – Physical Volume Management on CentOS 6).
Here is the basic design scheme:
LVM Volume Groups scheme (source: RedHat.com)
LVM Volume Groups scheme (source: RedHat.com)

Volume Group Management is a part 2/3 of LVM Management on CentOS 6!

In this post we will learn how to create, delete, extend, reduce, rename, merge, split and change Volume Groups (VG). We will learn how to prepare Volume Groups for Logical Volumes.

Let’s start our Volume Group Management on CentOS 6 guide!

For this example we have 3 additional hard drives:/dev/sdb (1GB), /dev/sdc (2GB) and /dev/sdd (3GB). /dev/sda2 is a pre-existing PV on my system that holds the system root and swap partition.

1. Displaying Volume Groups

We can display all Volume Groups (VG’s) on the system with the “vgdisplay” command:
[root@foo ~]# vgdisplay
 --- Volume group ---
 VG Name vg_foo
 System ID
 Format lvm2
 Metadata Areas 1
 Metadata Sequence No 3
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 2
 Open LV 2
 Max PV 0
 Cur PV 1
 Act PV 1
 VG Size 14.51 GiB
 PE Size 4.00 MiB
 Total PE 3714
 Alloc PE / Size 3714 / 14.51 GiB
 Free PE / Size 0 / 0
 VG UUID 3n3nzs-dzHK-rApY-EApz-Zz2H-JQVP-TlcYfF

We can also display Volume Groups with “vgscan” or “vgs” commands, but as we see the output is a bit different – in following example i will be using “vgdisplay“, because it gives me the most info:
[root@foo ~]# vgscan
 Reading all physical volumes. This may take a while...
 Found volume group "vg_foo" using metadata type lvm2
[root@foo ~]# vgs
 VG #PV #LV #SN Attr VSize VFree
 vg_foo 1 2 0 wz--n- 14.51g 0

We see there is currently only one existing Volume Group present. This VG is called vg_foo and is the VG, that holds the system root and swap partition. With the “vgdisplay” command we se additional info – VG size, PE size, Total PE,… This is the Physical Extent. A number of Physical Extents builds the Physical Volume.

2. Adding a Physical Volume to Volume Groups

We add PV’s to Volume Groups (VG’s) using “vgcreate name /dev/harddisk” command. It is very simple, no additional parameters are needed. Let’s see an example of creating a new VG called “geekpeek” and add /dev/sdb and /dev/sdc PV’s to it:
[root@foo ~]# vgcreate geekpeek /dev/sdb /dev/sdc
 Volume group "geekpeek" successfully created
[root@foo ~]# vgdisplay
 --- Volume group ---
 VG Name geekpeek
 System ID
 Format lvm2
 Metadata Areas 2
 Metadata Sequence No 1
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 0
 Open LV 0
 Max PV 0
 Cur PV 2
 Act PV 2
 VG Size 2.99 GiB
 PE Size 4.00 MiB
 Total PE 766
 Alloc PE / Size 0 / 0
 Free PE / Size 766 / 2.99 GiB
 VG UUID oj2GS6-l5aE-6WNv-QPJy-r1pC-ahSQ-EzFiKc
--- Volume group ---
 VG Name vg_foo
 System ID
 Format lvm2
 Metadata Areas 1
 Metadata Sequence No 3
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 2
 Open LV 2
 Max PV 0
 Cur PV 1
 Act PV 1
 VG Size 14.51 GiB
 PE Size 4.00 MiB
 Total PE 3714
 Alloc PE / Size 3714 / 14.51 GiB
 Free PE / Size 0 / 0
 VG UUID 3n3nzs-dzHK-rApY-EApz-Zz2H-JQVP-TlcYfF

We can see that VG was successfully created. We can also see the full state of the “geekpeek” VG – VG size, Total PE, PE size, …

3. Extending Volume Groups

We can extend a Volume Group with “vgextend” command. The simple syntax is “vgextend name /dev/harddisk“. By extending VG you add PV’s to it and extend VG’s size. In our example we will extend VG called “geekpeek” from 2.99GB to 5.99GB by adding /dev/sdd PV:
[root@foo ~]# vgextend geekpeek /dev/sdd
 Volume group "geekpeek" successfully extended
[root@foo ~]# vgdisplay
 --- Volume group ---
 VG Name geekpeek
 System ID
 Format lvm2
 Metadata Areas 3
 Metadata Sequence No 2
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 0
 Open LV 0
 Max PV 0
 Cur PV 3
 Act PV 3
 VG Size 5.99 GiB
 PE Size 4.00 MiB
 Total PE 1533
 Alloc PE / Size 0 / 0
 Free PE / Size 1533 / 5.99 GiB
 VG UUID oj2GS6-l5aE-6WNv-QPJy-r1pC-ahSQ-EzFiKc
--- Volume group ---
 VG Name vg_foo
 System ID
 Format lvm2
 Metadata Areas 1
 Metadata Sequence No 3
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 2
 Open LV 2
 Max PV 0
 Cur PV 1
 Act PV 1
 VG Size 14.51 GiB
 PE Size 4.00 MiB
 Total PE 3714
 Alloc PE / Size 3714 / 14.51 GiB
 Free PE / Size 0 / 0
 VG UUID 3n3nzs-dzHK-rApY-EApz-Zz2H-JQVP-TlcYfF

4. Reducing Volume Groups

We can reduce a Volume Group with “vgreduce” command. The simple syntax is “vgreduce name /dev/harddisk“. By reducing VG you remove PV’s from it and reduce VG’s size. In our example we will reduce VG called “geekpeek” from 5.99GB to 2.99GB by removing /dev/sdd PV:
[root@foo ~]# vgreduce geekpeek /dev/sdd
 Removed "/dev/sdd" from volume group "geekpeek"
[root@foo ~]# vgdisplay
 --- Volume group ---
 VG Name geekpeek
 System ID
 Format lvm2
 Metadata Areas 2
 Metadata Sequence No 5
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 0
 Open LV 0
 Max PV 0
 Cur PV 2
 Act PV 2
 VG Size 2.99 GiB
 PE Size 4.00 MiB
 Total PE 766
 Alloc PE / Size 0 / 0
 Free PE / Size 766 / 2.99 GiB
 VG UUID i339tr-lqNb-OKra-1FE2-UZ82-A1TI-t8w7BT
--- Volume group ---
 VG Name vg_foo
 System ID
 Format lvm2
 Metadata Areas 1
 Metadata Sequence No 3
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 2
 Open LV 2
 Max PV 0
 Cur PV 1
 Act PV 1
 VG Size 14.51 GiB
 PE Size 4.00 MiB
 Total PE 3714
 Alloc PE / Size 3714 / 14.51 GiB
 Free PE / Size 0 / 0
 VG UUID 3n3nzs-dzHK-rApY-EApz-Zz2H-JQVP-TlcYfF

5. Splitting Volume Groups

We can split Volume Group with “vgsplit” command. The simple syntax is “vgsplit name newname /dev/harddisk“. By splitting VG you remove PV’s from it and reduce VG’s size. In our example we will split VG called “geekpeek” and create a new VG called “splitgeek“:
[root@foo ~]# vgsplit geekpeek splitgeek /dev/sdd
 New volume group "splitgeek" successfully split from "geekpeek"
[root@foo ~]# vgdisplay
 --- Volume group ---
 VG Name splitgeek
 System ID
 Format lvm2
 Metadata Areas 1
 Metadata Sequence No 2
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 0
 Open LV 0
 Max PV 0
 Cur PV 1
 Act PV 1
 VG Size 3.00 GiB
 PE Size 4.00 MiB
 Total PE 767
 Alloc PE / Size 0 / 0
 Free PE / Size 767 / 3.00 GiB
 VG UUID 1ZvPM3-3jgO-0t1e-r4I1-Sxw2-vhUM-clGQLg
--- Volume group ---
 VG Name geekpeek
 System ID
 Format lvm2
 Metadata Areas 2
 Metadata Sequence No 3
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 0
 Open LV 0
 Max PV 0
 Cur PV 2
 Act PV 2
 VG Size 2.99 GiB
 PE Size 4.00 MiB
 Total PE 766
 Alloc PE / Size 0 / 0
 Free PE / Size 766 / 2.99 GiB
 VG UUID oj2GS6-l5aE-6WNv-QPJy-r1pC-ahSQ-EzFiKc
--- Volume group ---
 VG Name vg_foo
 System ID
 Format lvm2
 Metadata Areas 1
 Metadata Sequence No 3
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 2
 Open LV 2
 Max PV 0
 Cur PV 1
 Act PV 1
 VG Size 14.51 GiB
 PE Size 4.00 MiB
 Total PE 3714
 Alloc PE / Size 3714 / 14.51 GiB
 Free PE / Size 0 / 0
 VG UUID 3n3nzs-dzHK-rApY-EApz-Zz2H-JQVP-TlcYfF

6. Merging Volume Groups

In the next step we will merge the split Volume Groups (VG’s) back together. We can merge VG’s with “vgmerge” command. The simple syntax is “vgmerge name1 name2“:
[root@foo ~]# vgmerge geekpeek splitgeek
 Volume group "splitgeek" successfully merged into "geekpeek"
[root@foo ~]# vgdisplay
 --- Volume group ---
 VG Name geekpeek
 System ID
 Format lvm2
 Metadata Areas 3
 Metadata Sequence No 4
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 0
 Open LV 0
 Max PV 0
 Cur PV 3
 Act PV 3
 VG Size 5.99 GiB
 PE Size 4.00 MiB
 Total PE 1533
 Alloc PE / Size 0 / 0
 Free PE / Size 1533 / 5.99 GiB
 VG UUID oj2GS6-l5aE-6WNv-QPJy-r1pC-ahSQ-EzFiKc
--- Volume group ---
 VG Name vg_foo
 System ID
 Format lvm2
 Metadata Areas 1
 Metadata Sequence No 3
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 2
 Open LV 2
 Max PV 0
 Cur PV 1
 Act PV 1
 VG Size 14.51 GiB
 PE Size 4.00 MiB
 Total PE 3714
 Alloc PE / Size 3714 / 14.51 GiB
 Free PE / Size 0 / 0
 VG UUID 3n3nzs-dzHK-rApY-EApz-Zz2H-JQVP-TlcYfF

7. Changing Volume Groups

We can change Volume Group parameters with “vgchange” command. The simple syntax is “vgchange name -parameter value“. By changing VG’s you can change VG’s parameters – check “vgchange –help” for more info. In our example we will change PE size of our VG called “geekpeek“:
[root@foo ~]# vgchange geekpeek -s 2048KB
 Volume group "geekpeek" successfully changed
[root@foo ~]# vgdisplay
 --- Volume group ---
 VG Name geekpeek
 System ID
 Format lvm2
 Metadata Areas 3
 Metadata Sequence No 8
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 0
 Open LV 0
 Max PV 0
 Cur PV 3
 Act PV 3
 VG Size 5.99 GiB
 PE Size 2.00 MiB
 Total PE 3066
 Alloc PE / Size 0 / 0
 Free PE / Size 3066 / 5.99 GiB
 VG UUID oj2GS6-l5aE-6WNv-QPJy-r1pC-ahSQ-EzFiKc
--- Volume group ---
 VG Name vg_foo
 System ID
 Format lvm2
 Metadata Areas 1
 Metadata Sequence No 3
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 2
 Open LV 2
 Max PV 0
 Cur PV 1
 Act PV 1
 VG Size 14.51 GiB
 PE Size 4.00 MiB
 Total PE 3714
 Alloc PE / Size 3714 / 14.51 GiB
 Free PE / Size 0 / 0
 VG UUID 3n3nzs-dzHK-rApY-EApz-Zz2H-JQVP-TlcYfF

We can see that we have successfully changed Total PE size of VG from 4.00MBiB to 2.00MiB.

8. Remaning Volume Groups

We can rename Volume Group with “vgrename” command. The simple syntax is “vgrename name1 name2“. In our example we will rename our VG called “geekpeek” to “renamegeek“:
[root@foo ~]# vgrename geekpeek renamegeek
 Volume group "geekpeek" successfully renamed to "renamegeek"
[root@foo ~]# vgdisplay
 --- Volume group ---
 VG Name renamegeek
 System ID
 Format lvm2
 Metadata Areas 3
 Metadata Sequence No 9
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 0
 Open LV 0
 Max PV 0
 Cur PV 3
 Act PV 3
 VG Size 5.99 GiB
 PE Size 2.00 MiB
 Total PE 3066
 Alloc PE / Size 0 / 0
 Free PE / Size 3066 / 5.99 GiB
 VG UUID oj2GS6-l5aE-6WNv-QPJy-r1pC-ahSQ-EzFiKc
--- Volume group ---
 VG Name vg_foo
 System ID
 Format lvm2
 Metadata Areas 1
 Metadata Sequence No 3
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 2
 Open LV 2
 Max PV 0
 Cur PV 1
 Act PV 1
 VG Size 14.51 GiB
 PE Size 4.00 MiB
 Total PE 3714
 Alloc PE / Size 3714 / 14.51 GiB
 Free PE / Size 0 / 0
 VG UUID 3n3nzs-dzHK-rApY-EApz-Zz2H-JQVP-TlcYfF

We can see that we have successfully renamed VG “geekpeek” to “renamegeek“.

9. Removing Volume Groups

We can remove Volume Groups (VG’s) with “vgremove” command. The simple syntax is “vgremove name“. In our example we will remove VG called “geekpeek“:
[root@foo ~]# vgremove geekpeek
 Volume group "geekpeek" successfully removed.
[root@foo ~]# vgdisplay
--- Volume group ---
 VG Name vg_foo
 System ID
 Format lvm2
 Metadata Areas 1
 Metadata Sequence No 3
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 2
 Open LV 2
 Max PV 0
 Cur PV 1
 Act PV 1
 VG Size 14.51 GiB
 PE Size 4.00 MiB
 Total PE 3714
 Alloc PE / Size 3714 / 14.51 GiB
 Free PE / Size 0 / 0
 VG UUID 3n3nzs-dzHK-rApY-EApz-Zz2H-JQVP-TlcYfF

Before you manage your Volume Groups make appropriate reconfiguration of the Logical Volumes! If not, you can loose or corrput your data!


Source : http://geekpeek.net/lvm-volume-group-management/

Tuesday, April 15, 2014

Simple & easy way to jail users | Ubuntu

Jailkit is a set of utilities that can limit user accounts to a specific directory tree and to specific commands. Setting up a jail is much easier using the jailkit utilities that doing so 'by hand'. A jail is a directory tree that you create within your file system; the user cannot see any directories or files that are outside the jail directory. The user is jailed in that directory and it subdirectories.

Setup the compiler :
Centos       : yum groupinstall "Development Tools"

Ubuntu : apt-get install build-essential

Download & Install
# cd /tmp
# wget http://olivier.sessink.nl/jailkit/jailkit-2.14.tar.gz
# tar -zxvf jailkit-2.11.tar.gz
# cd jailkit-2.11
# ./configure
# make
# make install
Setting up the jail
make clean
export LDFLAGS="-pthread"
./configure && make

Now it’s time to set up the jail directory. Jailed users will see this directory as the root directory of the server. I chose to use /home/jail:
# mkdir /home/jail
# chown root:root /home/jail
# jk_init -v /home/jail basicshell
# jk_init -v /home/jail netutils
# jk_init -v /home/jail ssh
# jk_init -v /home/jail jk_lsh
Add a user
Add a new user with a home directory and bash shell, and set the password:
# useradd -d /home/testuser -m testuser -s /bin/bash
# passwd testuser
Now it’s time to jail this user, use the following command:
# jk_jailuser -m -j /home/jail testuser
Your /etc/passwd should contain something like this now:
testuser:x:1001:1001::/home/jail/./home/testuser:/usr/sbin/jk_chrootsh
Enable bash
By using jk_cp the bash libraries are be copied to the jail:
# jk_cp -v -f /home/jail /bin/bash
Now edit the /home/jail/etc/passwd file and make sure it contains something like this:
testuser:x:1001:1001::/home/testuser:/bin/bash
Maintenance
By using jk_update updates on the real system can be updated in the jail. A dry-run will >show what’s going on:
# jk_update -j /home/jail -d
Help Taken
This is been checked & verified , Working Properly

Wednesday, March 12, 2014

Unlock Modem CDMA Huawei EC156 (Modem Esia Max-D)

Modem Huawei EC156 bundlingan Esia Max-D

Modem ini pun sekarang bisa di pakai untuk kartu flexi EVDO.

Bumbu Bumbu Masakan :
1. Modem Huawei EC156 bundlingan Esia Max-D
2. Rempah Rempah Penyedap

Selanjut nya setelah bumbu masakan sudah siap semua, marilah kita memasak :D

Langkah Langkah Penting :
1. Ekstrak file Rempah Rempah Penyedap.

2. Install program DFS 3.3 dari folder diatas.

3. Tancapkan modem Huawei EC156 ke komputer.

4. Buka program DFS 3.3 yang telah diinstal tadi, lalu tekan tombol "port" (di bagian kiri atas), lalu pilih lah "Huawei Mobile Connect - Application Interface"

5. Tekan tombol SPC (dibagian kiri atas di bawah tombol "port"), maka akan muncul tulisan error di bagian bawah.

6. Klik tab "Memory" lalu di pilihan "Type", pilih lah "CEFS", kemudian pilih tombol "Read"

7. Setelah proses read selesai, pilih lah kolom "SPC1", kemudian akan muncul daftar alamat SPC yang memungkinkan (akan muncul 6 kolom), pilih lah kolom paling terakhir sendiri, dan kode SPC akan muncul di jendela hitam tengah.

8. Masukkan kode SPC yang kita peroleh tersebut ke dalam kolom di sebelah  tombol SPC (dibagian kiri atas di bawah tombol "port")

9. Tekan lagi tombol SPC (dibagian kiri atas di bawah tombol "port"), kali ini akan muncul tulisan "DEVICE UNLOCKED" di bagian bawah.

10. Sekarang klik tab "Programming", lalu tekan tombol "READ" di kolom SPC, setelah itu gantilah kode SPC nya dengan "000000" (tanpa tanda petik). Kemudian tekan tombol "WRITE"

11. JANGAN lupa catat MEID modem tersebut (kalau tidak tahu, MEID ada di sticker di doos modem, atau bisa read dari kolom MEID di langkah 10)

12. Bukalah program CDMA FLASH, lalu masukkan MEID yang tadi telah di catat, lalu tekan tombol calculate flash. akan muncul password untuk dimasukkan ke langkah selanjutnya.

13. Tutup lah program DFS, lalu buka lah file hasil ekstrak tadi "EC156Update_11.106.00.06.000.B416.exe", ikuti petunjuk nya, di next next aja, sampai di suruh masukkan password, masukkanlah password yang telah diperoleh dari langkah 12.

14. Tunggu sampai proses update selesai, maka modem Huawei EC156 anda telah berhasil di unlock :)

Setelah di unlock, aplikasi dashboardnya tetap menggunakan dashboad AHA dan sinyal nya akan tetap muncul AHA meskipun menggunakan kartu flexi, dan modem tetap bisa di pakai ke portable router Hame A1.

Do It With Your Own Risk

Source : http://saux70.blogspot.com/2013/05/unlock-modem-cdma-huawei-ec156-modem.html