Tuesday, 11 August 2009

Change Root Password In linux!

The following steps were used to successfully reset the root password of a "Fedora 10" machine. In general, can be applied to any linux machine.


1. GRUBWhile booting, after the initial splash and POST screen of the bios, the control transfers to GRUB. If there is just one linux operating system installed, the GRUB screen is bypassed to the booting screen, in that case just keep on pressing or tapping the ESC Button until you see the GRUB Menu.
2. Edit Choose the OS you want to boot into and press "e" to edit.
3. Edit Find the line that corresponds to kernel, and again press "e". Add the following line to the end of the line.

single init=/bin/bash


Then press enter, and then "b" to boot the OS. After booting you will get a root shell.

4. Mounting the filesystem in readwrite mode: Type in the following command to remount the filesystem in read write mode.

mount -o remount,rw /


Not doing this step might give the following error when running passwd, passwd: Authentication token lock busy.
5. passwd Next just use the passwd command, and give a new root password, Now that's simple.

6. Reboot or init 5




OR from the root shell, you can also edit the /etc/shadow file to remove the password.
OR copy the /etc/shadow /etc/passwd file and use John-The-Ripper software to try cracking the password.

Friday, 22 May 2009

The Rough Things I lerant so far in GE...

This is In rough form and Naive concepts which i experiences in last 5 month as a process of project devlopment....

Eclipse helps.
...Eclipse ignores the CLASSPATH variable,
1.for successful running, the jre must be compatible with runtime environment.

2.For adding the java doc right click on rt.jar (a jar file inside the jre library) and select the javadoc location,browse the
path up to the api folder of docs.api folder must contain a index.html and index-files folder. In similar way we can add the docs file for
a specific jar and application if the java doc is availabale.

3.To run the jar file inside the eclipse just insert it as external jar .it becomes a referenced library inside the
project .

4.small "+" next to jogl.jar in the list of libraries, this expands to show four options.
Select the "Native library location:" option and press the "Edit" button.
Select the "<\lib" directory.

5. for unit testing of GUI we use Jfcunit
and for the webpages Httpunit is used.

6.testing of mouse event and all are complex and cumbersome.

7.apache poi is used to read and write on the mocrosoft word.

8.we can extract tables from a word document using macros
for a macro go
tools->macro->visal basic editor .....write and manipulate the macros ... you can also debug it using watch and breakpoints. file-->close return to word document
again tools ->macro->macros ....run the specific macro




9. you can include external jars inside an jar using a plug in known as bigfat plug in

10. system properties are the special propery of java which return vender specific information like OS name, architecture name,current directory etc.
using this one can exclude hard coded things from an application


10 eclipse debugging: program run successfully but giving the source not found error in debugging

This is probably because the Launch Configuration that is being used to debug the app is set up to use JARs instead of depending on the Project(s) directly. If you don't explicitly attach source to JARs, Eclipse doesn't know where to get it. By making the Launch depend on Project(s) it automatically knows where the source is (in the project).
So, check the classpath of the Launch Configuration.

11, Apache Commons Api is used to upload your file on web server.

12.C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\lib----all jars and class file of servelet

13.all servelet classes:C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\classes

14 all jsp and html file :C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT

15 web .xml file:C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF

16.in netbeans Uml is possible in 6.1 and earliar version.

17. to create jar just clean and build one jar file be ready for run in the dist folder all external jar are inside the lib subfolder

18.in fedora system the rpm is file ready to install .
methods you need to chmod 755 and the sh file name ...
19.
In linux to kill the process first type
ps aux: it will display the complete list
kill pid

20.)to run a jar file use
java -jar .jar
in case of external jars
java -jar main jar.jar

21) There are methods to get file inside the jar file in a program . one can create independent application using these methods

userDirectory=System.getProperty("user.dir");
in = this.getClass().getResourceAsStream( );

22)There are some plugin like find bug and PMD which is used to refactor your java code for efficiency

Thanks for now[:)]

Linux

Check out this SlideShare Presentation: