How To: Remote Desktop to Windows Machine from Linux

If you know IP of a windows system and also you have a username and password. Then you can easily work in windows environment of that system from a Linux desktop provided that the remote system is switched on and is booted in windows. Also no one is logged in on that pc because only one person can access the pc at a time through this procedure.

There is a simple command u can launch from a linux terminal and that is..

[kulbirsaini@localhost ~] rdesktop -f  [IP address of the remote system]   [Enter]

e.g

[kulbirsaini@localhost ~] rdesktop -f 222.36.226.30 [Enter]

The full screen mode will appear and will ask for your username and password. Enter your password and experience that u r working in windows…

To return to the Linux press [ctrl-alt-enter] or go to the start menu and click disconnect. If this doesn’t work and you get some errors. Then you have to do some setting on the pc you want to access. Go to the pc and boot in windows and login as privileged user who has administrative privileges. Now click start and open my computer and go one directory up. Now right click on the my computer icon and click on properties. A new window will appear and on that window click remote and make sure that there is tick mark on the option “Allow users to connect remotely.”

 

How To: Yahoo Messenger on Teaching Lab Machines

Though the pcs in the labs are not having any support for applications except terminal or command line, Linux version of yahoo messenger can be opened there. This is a step by step procedure.

Step 1

Open two terminals and through one of them logon on to your mirage server account because that supports the Gaim(Linux version of yahoo messenger).

Step 2

Now I will call the terminal in which you are logged into mirage as remote machine and the terminal of the machine at which you are working as local machine.
At your local machine execute these commands.

1
2
[kulbir@localhost ~] xhost + [Enter]
access control disabled, clients can connect from any host

The messege displayed above should appear otherwise you may have problems.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[kulbir@localhost ~] /sbin/ifconfig [Enter]
eth0      Link encap:Ethernet  HWaddr 00:11:2F:57:C5:9D
inet addr:372.12.226.25  Bcast:122.12.226.123  Mask:212.223.345.138
UP BROADCAST RUNNING MULTICAST  MTU:1520  Metric:1
RX packets:136851 errors:0 dropped:0 overruns:0 frame:0
TX packets:82928 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:71106959 (67.8 Mb)  TX bytes:40997603 (39.0 Mb)
Interrupt:10
lo        Link encap:Local Loopback
inet addr:122.4.4.1  Mask:252.2.2.1
UP LOOPBACK RUNNING  MTU:11436  Metric:1
RX packets:46123 errors:0 dropped:0 overruns:0 frame:0
TX packets:46123 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:22001021 (20.9 Mb)  TX bytes:22001021 (20.9 Mb)

The address against inet_addr in 3rd line is the IP address of your local machine.

Step 3

Now switch to your remote machine terminal and issue the following commands…

[kulbir@server ~] export DISPLAY=[IP address]:0.0  [Enter]

e.g.

[kulbirsaini@server ~] export DISPLAY=222.26.36.5:0.0 [Enter]

If no error comes, means things are going fine.

[kulbir@server ~] xterm [Enter]

Now also if no error comes and a new teminal appears then you are ready to open the gaim.
Issue this command on the new appeared terminal

[kulbir@server ~] gaim [Enter]

yahoo messenger will appear and now you are ready to chat.
Add your account to the messenger and chat 😀

 

How To: Recover/Crack Root Password when Grub is Locked

The only essential thing is that you should have a Linux boot CD of the same operating system for which you want to crack root password. Some other Linux boot CD may work in some cases. If system is able to boot from the CD, it will take you to a command prompt as shown.

boot:

Type ‘linux rescue’ at this command prompt and enter as shown

boot: linux rescue [Enter]

It will take you to some interface with some questions, answer them properly. The system will go to temporary command prompt. Then issue the following commands

1
2
3
[bash$] chroot /mnt/sysimage [Enter]
[bash$] cd /boot/grub [Enter]
[bash$] vi menu.lst [Enter]

Now in this file you can see a line beginning with the word ‘password’ remove this line and save the file.

1
2
[bash$]exit
[bash$]exit

Now system will be rebooted and you can see the grub without a password. Don’t forget to remove the CD.

Press ‘e’ at boot screen and again by taking the pointer to the second line press e. Now you can see yourself on a command prompt. Remove ‘rhgb quiet’ from there and write single and press enter.

Now you will come back to the boot screen. Press ‘b’ and system will appear to boot and leave you in command line interface like this.

-bash2-$

Just type passwd like this

1
2
3
4
-bash2-$ passwd [Enter]
new password:
retype new password:
passwd: All authentication updated successfully.

Now you have set a new password. Now exit from the shell and system will boot properly in graphical interface.

-bash2-$ exit [Enter]

If there is any error in the procedure please post your suggestions.