Category: General information

General information

openlsm-0.99 released

openlsm-0.99 released

Dear All,

We are pleased to announce that the openslm-0.99 development platform released on 10th Jun 2009. We are sure that  all contributor’s of openlsm and IndianGNU.org community will start coding for openlsm…

* Please don’t forget to test openlsm and give your valuable feedback/suggestion!

community Blog – http://www.indiangnu.org/

Download openlsm ~

* http://openlsm.sourceforge.net/
http://sourceforge.net/project/showfiles.php?group_id=211420

What is openLSM?

openLSM is web-based control panel designed to make administration of website, GNU/Linux and Unix based operating system easy! openLSM handles all aspects of administration in its interface. It is free/open source software under GPL.

How to install openlsm ~

step 1) cd to the source directory

   ./configure --prefix=/usr/local/openlsm
    OR
    ./configure --prefix=/usr/local/openlsm --with-mysql=/usr/bin/mysql_config --enable-internal-pcre
    --with-geoip=/usr --with-ldap=/usr 	

   make
   make install
step 2) openLSM is using 'openlsm' user and group. please create system user and group and set homedir
    /usr/local/openlsm or 'prefix' value. Confirm ownership/permission of '/usr/local/openlsm'
     directory after installation.

  addgroup --system openlsm
  adduser --system  --home /usr/local/openlsm --shell /bin/false --gid <gid_of_openlsm_group>  openlsm

step 3) How to create a self signed certificate for SSL/TLS

 dd if=/dev/random  of=/tmp/random.dat bs=1024 count=1

 $ openssl genrsa   -out  /usr/local/openlsm/etc/openlsm/ssl/openlsm-certificate.key
    -rand /tmp/random.dat 2048
 $ openssl req -new -key /usr/local/openlsm/etc/openlsm/ssl/openlsm-certificate.key
   -out /usr/local/openlsm/etc/openlsm/ssl/openlsm-certificate.csr

 #generate certificate
 $ openssl x509 -req -days 365 -set_serial 1 -in
  /usr/local/openlsm/etc/openlsm/ssl/openlsm-certificate.csr
   -signkey /usr/local/openlsm/etc/openlsm/ssl/openlsm-certificate.key
   -out /usr/local/openlsm/etc/openlsm/ssl/openlsm-certificate.crt

step 4) please check permission, ownership of /usr/local/openlsm directory and file
        path in openlsm.conf  configuration file...

start openlsm with script in  contrib directory…

./contrib/openlsm start

URL ~ http://<server_name_or_ip>:4050/ or

http://<server_name_or_ip>:4060/

enjoy !!

Regards,
IndianGNU & openlsm

openLSM + Cherokee

openLSM + Cherokee

Dear All,

We are pleased to announce that tomorrow we are launching openslm-0.99 development platform. We are sure that  all contributor’s of openlsm and IndianGNU.org community will start coding for openlsm…

* Please don’t forget to test openlsm and give your valuable feedback/suggestion!

openlsm + Cherokee –

After all ups and  down finally openLSM community has decided to use Cherokee for openlsm admin server. We have customized Cherokee as per your requirement.

Thank you,
openLSM and IndianGNU.org

TATA Indicom USB modem (Epi Valley) on Ubuntu Linux

TATA Indicom USB modem (Epi Valley) on Ubuntu Linux

1] What is modem?

Modem (modulator-demodulator) is a device that modulates an analog carrier signal to encode digital information, and also demodulates such a carrier signal to decode the transmitted information. There are different types of modem available like Cable modems, ADSL modems, Optical modems and USB cellular modems.

2] USB cellular modems ?

USB (Universal Serial Bus) cellular modems use a USB port instead of a PCcard or PCMCIA Card (Personal Computer Memory Card International Association) slot. Difference between a cellular router and a cellular modem is that a cellular router normally allows multiple people to connect to it, while the modem is made for one connection. A cellular router may or may not have an external datacard

NOTE- I am using  SXC-1080 CDMA 1x USB MODEM modem (Epi Valley)

3] How to use it ?

Please refer the article http://www.indiangnu.org/2008/tata-indicom-datacard-huawei-cdma-on-linuxubuntu/ for more information. most of the steps are same…

** On Ubuntu Linux use “wvdialconf” command to generate configuration file and add user name and few other options as given below…

root@arun:/home/arunsb# wvdialconf

** My wvdial configuration file…

root@arun:/home/arunsb# cat   /etc/wvdial.conf

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
Baud = 460800
New PPPD = yes
Modem = /dev/ttyACM0
+FCLASS = 0
ISDN = 0
Phone =#777
Username = internet
Password = internet
# IMP setting
stupid mode = 1
root@arun:/home/arunsb#

** HOW to start / establish connection ?

root@arun:/home/arunsb# /etc/init.d/tataindicom
Usage: /etc/init.d/tataindicom {start|stop|status}
root@arun:/home/arunsb# /etc/init.d/tataindicom  start
Starting the TATA Indicom datacard service..
log file is /var/log/tataindicom.log

Done.
root@arun:/home/arunsb#

** Once connection is establish , you can verify the ppp0 interface and  route as shown below….

arunsb@arun:~$ ifconfig
….
……

ppp0 Link encap:Point-to-Point Protocol
inet addr:219.XX.XX.XX  P-t-P:172.XX.XX.14  Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1400  Metric:1
RX packets:31259 errors:124 dropped:0 overruns:0 frame:0
TX packets:32249 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:23928690 (22.8 MB)  TX bytes:4880834 (4.6 MB)

arunsb@arun:~$

root@arun:/home/arunsb# route -n

…..

** Want to see the “/etc/init.d/tataindicom” file?

root@arun:/home/arunsb# cat  /etc/init.d/tataindicom
#!/bin/bash
####
## daemon:: /usr/sbin/pppd  9600 modem crtscts defaultroute usehostname -detach user internet noipdefault call wvdial usepeerdns idle 0 logfd 6
####
case “$1” in

start)
echo “Starting the TATA Indicom datacard service..”
check=$(ps auxwww | grep “$(which wvdial)” | grep -v grep | awk  ‘{print $2}’)
if [ -z “$check” ];then
/usr/bin/wvdial > /var/log/tataindicom.log 2>&1  &
echo “log file is /var/log/tataindicom.log”
echo “…”
echo “Done.”
else
echo “TATA Indicom datacard service already running [pid = $check]”
fi
;;

stop)
echo “killing pppd daemon and dailer…”
kill -9 $(ps auxwww  |  grep “$(which wvdial)”  | grep -v grep | awk  ‘{print $2}’)
kill -9 $(ps auxwww  |  grep “$(which pppd)”  | grep -v grep | awk  ‘{print $2}’)
echo “…”
echo “Done.”
;;
status)
echo “TATA Indicom datacard -”
pid_of_dailer=$( ps auxwww  |  grep “$(which wvdial)”  | grep -v grep | awk  ‘{print $2}’)
pid_of_pppd=$(ps auxwww  |  grep “$(which pppd)”  | grep -v grep | awk  ‘{print $2}’)
pppd_details=”$(ps auxwww | grep “$(which pppd)” | grep -v grep   | awk -F’pppd’  ‘{print $2}’)”
echo -e “Dailer $(which wvdial) : $pid_of_dailer”
echo -e “pppd daemon $(which pppd) :: $pid_of_pppd   $(which pppd) $pppd_details”
;;
*)
echo “Usage: /etc/init.d/tataindicom {start|stop|status}”
exit 1
esac
exit 0
#DONE
root@arun:/home/arunsb#

**  Enjoy buddy!!!

Thank you,
Arun Bagul

How to read MBR (Master Boot Record)

How to read MBR (Master Boot Record)

1] What is MBR ?

Master Boot Record (MBR) is the 512-byte  boot sector (first sector) of a your a Hard Disk Drive (HDD). MBR contains –
1) Primary Partition table
2) Boot Loader (GRUB/LILO etc)

*** Total Size of MBR is 512 byte and which is divided as shown below…

1) Boot Loader (code) – 446 byte
2) Primary partion table – 64 byte (16 byte * 4)
3) Disk signature & others – 6 byte
4) MBR signature – 2 byte

2] Disk Partitioning – There are two methods/schemes of Disk partitioning

a) MBR Partition Table
b) GUID Partition Table

When a Hard Disk is partitioned with the MBR Partition Table scheme – MBR contains the primary partition entries. Maximum four (4) primary partition or three (3) primary partition and one extended partition can be created. The partition table entries for other secondary partitions are stored in Extended Partition Table. In extended partition, we can create 128 logical partitions.

When a Hard Disk is partitioned with the GUID Partition Table scheme – the Master Boot Record will still contain a partition table, but its only purpose is to indicate the existence of the GUID Table

3] How to read  MBR (Master Boot Record)

root@indiangnu:/home/arun# dd if=/dev/sda  of=/home/arun/MBR.details bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.00014018 s, 3.7 MB/s
root@indiangnu:/home/arun#

root@indiangnu:/home/arun# ls -shl   /home/arun/MBR.details
4.0K -rw-r–r– 1 root root 512 2008-09-28 17:57 /home/arun/MBR.details
root@indiangnu:/home/arun#

** The size of file is 512 byte and it is in binary format

command(1) – od

od command dump files in octal or other format
# od [options] file_name

Options
-a  select named characters, ignoring high-order bit
-b  select octal bytes
-c  select ASCII characters or backslash escapes
-i  select decimal ints
-x  select hexadecimal 2-byte units

** How to convert Binary MBR file data in other format like Hexadecimal format –

arun@indiangnu:~$ od -x /home/arun/MBR.details
0000000 48eb d090 00bc fb7c 0750 1f50 befc 7c1b
0000020 1bbf 5006 b957 01e5 a4f3 bdcb 07be 04b1
0000040 6e38 7c00 7509 8313 10c5 f4e2 18cd f58b
0000060 c683 4910 1974 2c38 f674 b5a0 b407 0203
0000100 00ff 2000 0001 0000 0200 90fa f690 80c2
0000120 0275 80b2 59ea 007c 3100 8ec0 8ed8 bcd0
0000140 2000 a0fb 7c40 ff3c 0274 c288 be52 7d7f
0000160 34e8 f601 80c2 5474 41b4 aabb cd55 5a13
0000200 7252 8149 55fb 75aa a043 7c41 c084 0575
0000220 e183 7401 6637 4c8b be10 7c05 44c6 01ff
0000240 8b66 441e c77c 1004 c700 0244 0001 8966
0000260 085c 44c7 0006 6670 c031 4489 6604 4489
0000300 b40c cd42 7213 bb05 7000 7deb 08b4 13cd
0000320 0a73 c2f6 0f80 ea84 e900 008d 05be c67c
0000340 ff44 6600 c031 f088 6640 4489 3104 88d2
0000360 c1ca 02e2 e888 f488 8940 0844 c031 d088
0000400 e8c0 6602 0489 a166 7c44 3166 66d2 34f7
0000420 5488 660a d231 f766 0474 5488 890b 0c44
0000440 443b 7d08 8a3c 0d54 e2c0 8a06 0a4c c1fe
0000460 d108 6c8a 5a0c 748a bb0b 7000 c38e db31
0000500 01b8 cd02 7213 8c2a 8ec3 4806 607c b91e
0000520 0100 db8e f631 ff31 f3fc 1fa5 ff61 4226
0000540 be7c 7d85 40e8 eb00 be0e 7d8a 38e8 eb00
0000560 be06 7d94 30e8 be00 7d99 2ae8 eb00 47fe
0000600 5552 2042 4700 6f65 006d 6148 6472 4420
0000620 7369 006b 6552 6461 2000 7245 6f72 0072
0000640 01bb b400 cd0e ac10 003c f475 00c3 0000
0000660 0000 0000 0000 0000 a328 228b 0000 0180
0000700 0001 fe07 ffff 003f 0000 1637 0271 0000
0000720 ffc1 fe07 ffff 1676 0271 0d7a 0177 fe00
0000740 ffff fe83 ffff 23f0 03e8 f10c 0002 0000
0000760 ffc1 fe05 ffff 14fc 03eb cfc5 0565 aa55
0001000
arun@indiangnu:~$

** you can also use following command

arun@indiangnu:~$ od -ax /home/arun/MBR.details

Thank you,
Arun Bagul