NE#43 Juniper Password Recovery & Default Factory Config

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to the network engineering video blog I'm your host Michael crane today we're going to talk about resetting or recovering slat well actually resetting the root password in our juniper m5 router as you may recall we purchased this router on eBay a while back and they did not blow away the config in it so so today I'm going to recover the the root password will not actually recover but reset it to where we can log into it and then I'm also going to just blow away they can fig because we don't want a bunch old config stuck in there so and I debated whether I should do this video or not it's it's really pretty simple all you do is you console into the the router you boot it up and you know do a I think there's just like two or three commands and and boom you're you're in the in halves root but anyway today we're just going to reset the root password and then we're going to reset the config to factory defaults so let's get started okay so first off let's take a quick look at the cables yes I am I am using a Cisco console cable here you can tell by the blue I believe this cable is a rollover cable so with the juniper the the m5 we have it has a DC II console port and so most laptops also have a DC console port you can kind of tell because it'll have like the male connector instead of the female connector like this so your laptop will have something like that of course no laptops have db9 s anymore but golden ones older ones did anyway so what we're looking to do is is since we're going from a DC to DC II what we need as we need a rollover and that's what this cable does it's a the the Cisco console is also a DC so they roll over this cable so you can talk to it so we need this this this rollover cable and then we also need this db9 adapter and I this is a straight through adapter but anyway it's a let's see if I can show it to you well I don't know if it focused in on that but anyway it's a Cisco 7 4 - 0 for 9 501 rj45 to db9 adapter and then we also need for all the newer laptops a a standard db9 2 USB adapter and this over here is just a USB cable extender that I use in the lab here so these are the three components that we need you could build this using other different kind of components you know you could have a db9 straight-through cable with a rollover or or what they call and no modem on them no so because when you went to DC E or two DTE devices or talk to each other you have to roll the the transmit and receive so okay that's enough about the cables let's get started ok so to get started we're going to need a putty session and to keep this short I'm not going to go through setting up putty and that sort of stuff but basically you know when you when you plug in your USB adapter right you go to your device manager on a Windows machine go to comm ports and then see what USB it's on right then you come over to your putty and you say it's a serial it's comm 7 its 9600 no parity 8 bits and one stop bit or something like that I I'd have to here you know speed 9608 data bits one stop bit no parity alright so let's uh let's go ahead and open this up and oh by the way I am following this guide right here I'll put a link to this guide in the comments of this video so you can you can look at it and it's actually got its own video and that's why L was almost didn't do this video because there's this is so easy but I figured for completeness why not so and you can read through all this stuff basically we're gonna plug into our console right we're gonna power it up and then we're going to wait till we see this in the in the boot messages so we can hit the spacebar to get the command prompt so I'm gonna go fire this up and we'll sit here and wait now don't get confused with press Delete to enter setup that is not the correct this is not the correct time to to try to stop the boot sequence all right so hopefully I got it fast enough let's see here yep I missed it now okay so let's try that again okay I went ahead and rebooted it and I'm gonna keep my hand on the spacebar so I can catch it as soon as I see that that a message okay so I was able to catch it this time we're gonna go ahead and do a boot - s on it and then just let it boot up into single-user mode okay so now we've got to this prompt right here and we're going to just type in recovery okay and now we're in the CLI as you can tell by it saying it started the CLI and that's step 13 here on our document so now we're going to set the root password and it's kind of interesting it actually has instructions right here so it's going to tell us to see wasn't see all you need to enter configuration mode using configure which yeah I don't really see that in here but you can tell by this edit right here that you need to be in the configuration oh it says it right here configuration mode in the CLI it just doesn't give you the command so okay we're just gonna enter a configure ok so now we're in the configuration edit mode and we're just gonna I'm just gonna copy and paste this whole thing right and the new password is gonna be juniper one juniper one alright and now we're gonna do a commit and two exits so that's very handy very nice of them to help us out like that it and it's really it's right here in the document - you can see it's um so we entered the new password second prompt ran into the password commit exit configuration mode and CLI actually exit operational mode it's just exit that's the two exits right here that looks very interesting that's actually the old host name of this I'm wondering very interesting anyway so we're gonna do an exit exit reboot okay so I went ahead and rebooted it and it it booted up and so we're gonna log in as root and the password that we just said is juniper one and okay and and in that last segment you notice it had a host name and and now the host name is gone because he would tell you hostname you can see it has none it was very strange it was like it found an old hostname even though I I have already cleared the config in this router and we will take a look at it so you just type in CLI to get to the Junos command-line interface to show config and as you can see there's there's nothing in here and yeah cuz I've already you know blown away that config in this thing I just wanted to go ahead and do a video showing you how to do it for completeness and so anyway let me show you how to blow away the config since we're talking about it you know I'll put a link to this document in the comments under the video but we're going to use this right here the reverting to factory default configuration by using oops there we go by using the load factory default command and hey they've got this other command I've never used the 0 eyes command so yeah I don't really know what that is I've always used this load factory default and I do believe it it works on pretty much every juniper router and and so anyway you can read about it if you want to so what we're gonna do is is I'm going to go into can it's alright so you go into the into the CLI and then you go into configure ok and then you just pop in this load factor default command alright and then it tells you to use this command right here but this command does not work on mine and it's probably because it's super old the operating system but as you can see it doesn't like factory settings delete system commit factory settings that doesn't like that I'm not even sure what this is for it it says if you're using person you must delete system commit factory settings set the root password and commit to configure these steps are not required when you revert to factory default configuration by using the zero eyes command but I know that I can skip this without having any problems so and what's funny about it is if you read this procedure right here it says the load factory default command is standard above a blogger and it says it replaces the current active configuration with the factory default config except the root password which is not the case because so I I've already loaded the factory default if I try to do a commit right here it says missing mandatory statement root authentication so it actually does blow away the root password so yeah I don't know this might be a newer version of software this is for but anyway so we have to set the root password again which is not that big of a deal just copying paste it and it's juniper one juniper one all right and now we do a commit and yeah you can do this I didn't do it I just as soon as I did that I'm done so we're gonna do an exit exit and now I'm just gonna do a reboot and it should come right up okay so booted back up and we are good to go so how I was able to login and I notice we have an alarm we'll have to fix that in another video so anyway I I hope you liked this video if you have any questions or comments leave them in the comments under the video and I'll try to answer them the best I can and I will see you next time
Info
Channel: Network Engineering Video Blog
Views: 4,840
Rating: 4.7419353 out of 5
Keywords: Michael Crane, Muxall, Juniper, Root Password, JunOS, Factory Default, Initial Config, Password Reset, Password Recovery, Null Modem, Roll Over Cable, Console Access, Juniper M5, Router, Lost Password, Lost root password
Id: sW2cr0Z_5bo
Channel Id: undefined
Length: 14min 9sec (849 seconds)
Published: Wed Oct 18 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.