Thursday, March 13, 2014

How to disable bug search without login to bugzilla

I have a bugzilla account, which only authorized users can login and add bugs. Public have no rights to post a bug, edit or comment. But public have privellage to search the bugs.

This is because end users when adding bugs they have to enable an option “Only users in all of the selected groups can view this bug” to restrict the view from public.

Solution : Login as admini user, Navigate to Administration, Parameters, User Authentication
Change the value of requirelogin to On.

Wednesday, March 12, 2014

How to change time zone in ubuntu12.04

Friends,

While checking my box, i came to know that my time/date is UTC zone. I would like to change the time zone to IST.

In command prompt, i logged in as root

dpkg-reconfigure tzdata

It will ask the zone which you needed, change it.

Check the new time zone by issuing the command date, you can see the result.

Friday, March 7, 2014

Cron job to run every second

I need a Cron job to run every second

* * * * * /mnt/scripts/permission.sh >> /dev/null 2>&1
* * * * * sleep 1; /mnt/scripts/permission.sh >> /dev/null 2>&1
* * * * * sleep 2; /mnt/scripts/permission.sh >> /dev/null 2>&1
* * * * * sleep 3; /mnt/scripts/permission.sh >> /dev/null 2>&1
* * * * * sleep 4; /mnt/scripts/permission.sh >> /dev/null 2>&1
* * * * * sleep 5; /mnt/scripts/permission.sh >> /dev/null 2>&1
* * * * * sleep 6; /mnt/scripts/permission.sh >> /dev/null 2>&1
* * * * * sleep 7; /mnt/scripts/permission.sh >> /dev/null 2>&1
* * * * * sleep 8; /mnt/scripts/permission.sh >> /dev/null 2>&1
* * * * * sleep 9; /mnt/scripts/permission.sh >> /dev/null 2>&1
* * * * * sleep 10; /mnt/scripts/permission.sh >> /dev/null 2>&1
like this we need to give till sleep 59

Monday, March 3, 2014

apt-get install gives 403 Forbidden on Ubuntu 12.04 LTS EC2 Instance

For some of the package installation using apt-get i am getting 403 Forbidden error.

root@ip-172-32-14-23:~# apt-get install php5-gd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  fontconfig-config libfontconfig1 libgd2-xpm libt1-5 libxpm4 ttf-dejavu-core
Suggested packages:
  libgd-tools
The following packages will be REMOVED:
  libgd2-noxpm
The following NEW packages will be installed:
  fontconfig-config libfontconfig1 libgd2-xpm libt1-5 libxpm4 php5-gd ttf-dejavu-core
0 upgraded, 7 newly installed, 1 to remove and 7 not upgraded.
Need to get 169 kB/2,157 kB of archives.
After this operation, 4,277 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Err http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main fontconfig-config all 2.8.0-3ubuntu9.1
  403  Forbidden
Err http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main libfontconfig1 amd64 2.8.0-3ubuntu9.1
  403  Forbidden
Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/pool/main/f/fontconfig/fontconfig-config_2.8.0-3ubuntu9.1_all.deb  403  Forbidden
Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/pool/main/f/fontconfig/libfontconfig1_2.8.0-3ubuntu9.1_amd64.deb  403  Forbidden
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

FIX :
sudo vi /etc/apt/sources.list
Remove the entries us-west-1.ec2 as prefix:
Add the following in the file

deb http://us.archive.ubuntu.com/ubuntu lucid main multiverse universe
deb http://us.archive.ubuntu.com/ubuntu lucid-security main multiverse universe
deb http://us.archive.ubuntu.com/ubuntu lucid-updates main multiverse universe

sudo apt-get upgrade
Then i done my package installation with out any error
sudo apt-get install php5-gd

Wednesday, January 8, 2014

Converting Your Private Key Using PuTTYgen

PuTTY does not natively support the private key format (.pem) generated by Amazon EC2. PuTTY has a tool named PuTTYgen, which can convert keys to the required PuTTY format (.ppk). You must convert your private key into this format (.ppk) before attempting to connect to your instance using PuTTY.

To convert your private key

    Start PuTTYgen (for example, from the Start menu, click All Programs > PuTTY > PuTTYgen).

    Under Type of key to generate, select SSH-2 RSA.

   Click Load. By default, PuTTYgen displays only files with the extension .ppk. To locate your .pem file, select the option to display files of all types

    Select your .pem file and click Open. Click OK to dismiss the confirmation dialog box.

    Click Save private key to save the key in the format that PuTTY can use. PuTTYgen displays a warning about saving the key without a passphrase. Click Yes.

    Note

    A passphrase on a private key is an extra layer of protection, so even if your private key is discovered, it can't be used without the passphrase. The downside to using a passphrase is that it makes automation harder because human intervention is needed to log on to an instance, or copy files to an instance.

    Specify the same name for the key that you used for the key pair (for example, my-key-pair). PuTTY automatically adds the .ppk file extension.

Your private key is now in the correct format for use with PuTTY. You can now connect to your instance using PuTTY's SSH client.

{Content of  ~/.ssh/id_rsa can be replaced with .pem file, it works fine}

Wednesday, December 25, 2013

Excel: How To Reference Cells in Other Worksheets

For an Excel formula that needs to reference a cell in a different worksheet in the same workbook, use the following format for your formula.


SheetName!CellAddress (Precede the cell address with the worksheet name, and follow it with an exclamation point).

Note: For worksheet names that include one or more spaces, you will need to enclose it in single quotation marks. The following is a formula that refers to a cell on a sheet by the name of Monthly Sales:

=B4*’Monthly Sales’!A12
- See more at: http://www.tech-recipes.com/rx/1604/excel_how_to_reference_cells_in_other_worksheets/#sthash.4lmJrLfM.dpuf

Wednesday, December 18, 2013

While restarting network service my name servers in /etc/resolv.conf got vanished

While restarting network service my name servers in /etc/resolv.conf got vanished in CentOS

[root@Hostname ~]# /etc/init.d/network restart
Shutting down interface eth0:  Device state: 3 (disconnected)
                                                           [  OK  ]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:  Active connection state: activated
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/3
                                                           [  OK  ]


Solution:
While troubleshooting i noticed the box have "NetworkManager" installed. I removed it

[root@Hostname ~]# yum remove NetworkManager
It helped me to solve that issue.