Sunday, September 25, 2011

Seagate Service Center In Pune

People face a lot of difficulties in finding the seagate center in Pune as no proper information is available. So I am going to update the information with the exact location of the facility.

Seagate hard_disks are serviced by a firm called "Accel Frontline" which provides the services to Seagate.
The seagate replacement office is situated near Corporation(Manpa) near the District court. In front of the Distric court, there is a Gas Agency. On the second floor of that building is the Seagate's repairing office.


Before going to the office there, you need to register to the Accel Frontline's website.

http://myservice.accelwms.in/

After registering at the website, you will get a customer ID which you need to provide when you are returning the defected HDD.

Kindly note that this information is correct as per on 25th September 2011. So its the updated information.

Also, all kinds of HDD repairs, RAM repairs are done at this office only.

Wednesday, August 24, 2011

Using tftp in Ubuntu 10.10

I tried to use tftp in ubuntu 11.04 but it was giving error. Maybe the support for ubuntu at the time of writing this blog is not available. So I tried using tftp in ubuntu 10.10 and it worked. So what you need to use tftp.

First you need to install tftp. For that use this command:-
$sudo apt-get install tftpd-hpa

Now the default directory which will be accessed while doing tftp to the server is having location address as :-
/var/lib/tftpboot
You can get this address by viewing the contents of tftpd-hpa file present at location "/etc/default/tftpd-hpa"

Now add all the files which you want to be accessed via tftp in this directory. This directory will appear as the parent directory.
Make sure you have given proper permissions to the files to be accessed.

Now simply goto command prompt and type "tftp <server_ip_address>" like "tftp localhost"
Now you will get a prompt as "tftp>""
Here you can write the commands.

For getting the file, type "get <filename_on_server>  <filename_to_be_used_o_client>" like:-
tftp> get rahul.txt new.txt

Now this file will be copied to you computer. It will be in the directory in which you are currently in. I.E. when you do tftp <host>, the directory in which you are there at that time, the file is copied to that directory.

Similarly to put the files on the tftp server, you need to use the command "put "filename" "server_path" "

To exit from the tftp command prompt, simply type "quit" and you will exit from it.

One thing to be kept in mind is that the path for tftp server starts from the tftpboot directory. So if you have rr directory inside tftpboot directory and want to access any file inside rr, then you have to specify the path as /rr/<filename>. Therefore, the default path starts from the tftpboot directory.

If you have any queries, then do comment, I would be happy to help...... :)

Tuesday, August 23, 2011

How to enable DHCP in Ubuntu 11.04

For DHCP, you will need to first install DHCP3-SERVER.
Open terminal and write "sudo apt-get install dhcp3-server

Once its installed, you need to check in few things:-
If your system is having more than one NIC, then you need to specify which nic is to be used for the DHCP service.
For that, type "sudo vi /etc/default/isc-dhcp-server"

Now in this, goto the line 'INTERFACES="" ' and enter the name of ethernet you want to use for dhcp there..... like 'INTERFACES="eth0" '

Now if your network adapter is getting IP via some other DHCP server, then you need to specify the subnet mask. So for that you need to modify the dhcpd.conf file. For that type "sudo vi /etc/dhcp/dhcpd.conf"
In that add this line "subnet <ip address> netmask <netmask_value>{} " like "subnet 192.168.233.129 netmask 255.255.255.0 {}"

Now restart the dhcp server and you will have it running. Type "/etc/init.d/isc-dhcp-server restart"

Now your dhcp server is running. You need to provide range that can be allocated in the dhcpd.conf file.....

Friday, August 12, 2011

VM creation using Python for XenServer

I tried for 4-5 days to create a VM for XenServer using Python and finally I am able to create a VM for XEN. Here I am going to tell you the basic steps needed to be performed to do the operations.

VM creation involves 3 things in common.
1. Creation of VM.
2. Creation of disk referred as VDI.
3. Creation of VBD which acts as a link between VM and Disk.
(Network card is the other optional thing which can be added.. for that you need VIF)

So, In the code, I have first created a Disk, then created a VM, and then passed both as parameters while creating VBD which will attach Disk to the VM. Here is the code:-

Monday, July 11, 2011

How to add environment variables for Python

To add an environment variable for Python, like you want to set the directory where all your python scripts will be stored to be added directly at runtime, you need to set the environment variable. For that, follow the steps:-

1. Goto myComputer and right click onto that. Goto System Properties.


Now in properties, goto Advanced System Properties and in that dialog, select Advanced. Click on Environment Variables provided there.



In the system Variable Section, select New and then specify as:-
Variable Name: PYTHONPATH
Variable Value: <Path of your scripts folder where you store your scripts>



Click ok. Now close and restart the Python Shell. It will get that environment Variable.

You can check by typing the following commands:-
>>>import sys
>>>sys.path

It should contain the path of your directory which is set.

Thursday, June 16, 2011

Moving Buttons from left to right in Ubuntu

Ubuntu now default comes with mac style layout with minimize, maximize and close buttons on the left side and it is a problem for some as they don't like this layout. So we can change them from left to right using simple steps.

Step1:-
Press Alt+F2 to open the "Run Application" Dialog box.
In that, enter gconf-editor and press enter.


Step2:-
Now a window will come up having a list of options. From that, choose Apps and expand the dropdown.
Now from the dropdown list, goto "Metacity" and then click on "general" submenu in it.
Now on right hand side, you will get the list of many options. From that, select "Button_layout".
Double click on it and change its value to "menu:minimize,maximize,close"
Now click ok.

You will see that now the buttons are placed to the right of the opened windows or applications.

Thanks for reading the post.

Monday, June 13, 2011

Add and remove users by command prompt.....

While doing our project, we came to a position where we needed to have abt 40-50 users in SAM database and to add them using GUI would be a very lengthy process.

So we decided to use command prompt.

All you have to do is to create a .BAT file and add the following command to it.

net user (username) (password) /add /comment:"Test user, DELETE ME"
net user Rahul abcd /add /comment:"Test user, DELETE ME"

So, add the user names and passwords below one by one and run the bat file. All will be added.

To remove them, again create a .bat file and use this command.

net user Rahul /delete

So, we just created the file, added 20-30 lines with username and password and got them added to database.

INTERESTING POINT:-
You can also create a prank with them.
1. Just create the bat file with 30-40 user list to be added.
2. Name it like game.bat or some other name so that other user clicks on it.
If he will click, all the accounts will be created on his computer. And you know the password as well.....

It will lead to so many accounts appearing at the time of login and will take a lot of time showing the login screen.

For removing them, you need to provide him the simple remove.bat file with remove command for all users and he can successfully remove all the user accounts.

Thanks for reading the post.... :)