Sunday, 28 August 2011

Entering single user mode without rood password

Now days most of the distros are password protected even in singled user mode,hopefully everybody knows that you have press E at the boot promt and with kernel paramaters pass S as an argument and then ENTER and press b... like the screen shot attached below


But you ll be stuck in a place where it ll ask you to enter root password of enter CTRL-D. Attached screen shot below.



what if you don remeber the root password, how do we by pass this. well thats simple. all you have to do is add a parameter that replaces init , during the actual boot up always the init parameter will be /sbin/init  which is the first process which spawns all the other process, now what we are going to do it replace this process with bash. that is pass the parameter as init = /bin/bash it ll take you straight to the bash prompt without asking for a password. Now follow the screen shot below





 Initially after it takes us to the bash prompt when we do a passwd, the password remains unchanged  this is because we have tweaked the normal boot up process so our root file system mounts in read only mode we have to remount it with read write mode; after we remount it with write mode.( if you notice in the grub prompt while writing init = /bin/bash there is a text 'ro' if you replace it with 'rw' then there is no need of remounting it with write permission), if we execute the command we can happily change the password and reboot into normal mode and start linuxing :)

hope this helps.


Thursday, 18 August 2011

portforwarding in BSNL router

its been a pain in the ass to download from torrent using my bsnl router(nokia Siemens 1600),
all these days i was using.. i am writing this blog coz i was not able to find one proper link for my router .. guess my router will soon be an antique ..lol !! ...



DMZ host to forward all traffic that comes to all unwanted ports to the host mentioned here..



but it was unnecessary as all unwanted traffic was coming to this machine, would be great if i could just forward only my torrent incoming port packets to the destined machine.

googling gave me this beautiful link

http://192.168.1.1/scvrtsrv.cmd

just add your server ip, and the port what your torrent client is using.. bingo :) your port is open now ...

port open .. :)   enjoy ..
happy downloading












Monday, 8 August 2011

Resetting your startx server, well every one knows its press ctrl+altr+bkspace..
but now days ubuntu is not supporting that future and i get totally annoyed when i am playing around with compiz and i screw up something to restart the whole pc again, so here is a small command that enables ctrl+alt+bkspace in ubuntu.

setxkbmap -option terminate:ctrl_alt_bksp