Showing posts with label changes. Show all posts
Showing posts with label changes. Show all posts

Tuesday, June 13, 2017

Password recovery hostname changes in linux

Password recovery hostname changes in linux


So..it recently happened to me when I while messing with my system, i wrote a script to change root password & set it to expire in every 7 days & simultaneously making changes to hostname by setting it to a random value.. I queried my friend Raghu for inputs regarding it & got some interesting results,which I will be compiling here. This tutorial is intended for Linux newbies & would help them to get familiar with the enviornment. Actually, after 7 days what happened I tried to log in,& it always said "root password expired, please contact your administrator"..seems familiar ? well..here is how you can eradicate this.

( PS:
Folks..if you think you are too dumb to do
that, there exists an automated "burn-the-cd-boot-&-forget-solution"
called KONBOOT which can reset Linux passwords if you care.. :D choose your pick
)

I actually rebooted the system & once I reached grub,selected the kernel, I pressed "e".I proceeded to 2nd line of configuration & pressed "e" again.

kernel /boot/vmlinuz-2.6.34.6-47.fc13.i686 ro
Obviously, I edited the file by pressing "e" again & modifying it by typing "single" for invoking single user mode in Linux.
kernel /boot/vmlinuz-2.6.34.6-47.fc13.i686 ro single
Press "b" key to boot. Afterwards, you are given a prompt, please enter "passwd" command to reset root password.
After that, login as root & then proceed to move to /etc/shadow

[root@zion XERO]# cd /etc
[root@zion etc]# vi shadow
& check the entry for root,it should look similar to this

root:$6$McKhE96JGhl$uIfjBcMrrrL2x8aJ17mATex8WNXVMvZXrsfqoOL.
CinR9W2C8VXVyt4W2yt4eAJ0tgNPU2Kftr1f/lcvDG.:14859:0:99999:7::1:

you can see there is a "1" in last entry which sets the root account to expire. remove it such that it becomes

root:$6$McKhE96JGhl$uIfjBcMrrrL2x8aJ17mATex8WNXVMvZXrsfqoOL.
CinR9W2C8VXVyt4W2yt4eAJ0tgNPU2Kftr1f/lcvDG.:14859:0:99999:7:::


Once done, save the file & exit by pressing :wq! in vi. After that, boot into graphical mode by typing

[root@zion XERO]# init 5
login with your password."root" problem solved :) After wards..i found out that my hostname was changed..so, here are three easy ways to change your hostname on your will.

Way 1
open console, & type
[root@zion XERO]# hostname
NETWORKING=yes
HOSTNAME=hosty.test.com
now you can reset hostname (for the given session) by typing -
[root@zion XERO]# hostname myhostname.mysite.com
where myhostname.mysite.com is your new hostname.

WAY 2
The second way deals with editing a file known as "network" located in /etc/sysconfig/network, navigate to it

[root@zion XERO]# cd /etc/sysconfig/
check the value of hostname in it
[root@zion sysconfig]# cat network
NETWORKING=yes
HOSTNAME=hosty.test.com
time to change it, go to vi & edit it.
[root@zion sysconfig]# vi network
NETWORKING=yes
HOSTNAME=myhost.testsite.com
~                                                                                                             
~                                                                                                             
~                 
:wq!
saved the file..reboot & its done :)

WAY 3
The third way deals with "sysctl" command, which can be used to change the variable kernel.hostname. Start by checking its current value by typing

[root@station3 sysconfig]# sysctl kernel.hostname
kernel.hostname = hosty.test.com
and to change it, enter

[root@station3 sysconfig]# sysctl kernel.hostname=MYHOST.TESTSITE.COM

where MYHOST.TESTSITE.COM is your new hostname.
All of this was scripted,tested in FEDORA 13 (2.6.34.6-47.fc13.i686) & written using Scrib Fire
 .

I hope it was interesting :)

Like This post ?  You can buy me a Beer :)
Posted by XERO. ALL RIGHTS RESERVED.

Go to link Download

Read more »

Thursday, January 12, 2017

Pro Hack Version 3 0 Changes – Mobile version released

Pro Hack Version 3 0 Changes – Mobile version released


Before I start posting in full, I would like to enumerate Prohack ver3.0 changes, so that you get familiar with the site. Prohack changes - theprohack.com Trust me, you will agree that Prohack is better than ever as of now & it will continue to improve. I have experimented with wordpress, It was nice, but I will hold on till I get a superb hosting & a template that completes my set of requirements. Hence forth, the major changes are -

  • Mobile version – Yep, a brand new mobile version of website is live at

http://m.theprohack.com

You can access the mobile version by clicking on the top bar link too

Prohack Mobile Version - theprohack.com

 

  • Brand new theme – The most obvious change is the theme of Prohack, its minimalistic & other elements will enhance its looks. Bare me with me :)

 

  • More streamlined interface – The interface has been stripped down to bare minimum with navigation streamlined to maximum extent. I got a lot of feedback (100+ mails) regarding the look of website & implemented the most sought out changes here.

 

  • Faster loading time – Now thats a real gem. the loading time has been decreased by more than 55% to 4.38 seconds as compared to staggering 11 seconds earlier. See the stats for Prohack & Mobile version courtesy of GTmetrix , click here to see the actual stats in realtime . Also, better Yslow & Pagespeed scores have been attained, as compare to older version which scored way below in both these parameters.

 

Statistics 

 

  • Advertising rates shed down – The name says it all, go to advertising section for more details.

 

  • Pagerank 4 Once again :) It was a real charm to have a Pagerank 4 from 3 :)

 

  • Less advertisements - Or you can say less advertisements that come into your way while you are surfing :)

 

  • Brand new propaganda – Its what I leave upto You to decide. However I will be having a tactical shift to more tech oriented articles with practical guides.

 

Plus, small changes have been implemented at the website, which you will experience in your stay.

 

Subscribe using RSS      Follow me at Twitter       Get Instant SMS updates      Prohack at Facebook     Donate me ..

 

Feedback..the most important part of the whole change, please drop an email to me at

admin@theprohack.com

 

Cheers

 

- Rishabh Dangwal

“xero”


Go to link Download

Read more »