Sunteți pe pagina 1din 2

FreeBSD Reset or Recover Root Password by N IX C RA FT on 21 C O MME NT S LA ST U PD ATE D in F RE EB SD, O !

TO , TI PS

!"t# FreeBSD vers"o$ %&' a$d a(ove t#e (oot"$) *roced+re "s s,")#t,- c#a$)ed& T#e o,der vers"o$ o. FreeBSD +ses t#e (oot /s o*t"o$ at O0 *ro1*t& owever, w"t# FreeBSD vers"o$ FreeBSD %&'2 -o+ do$3t #ave to t-*e a$- co11a$ds& ere "s t#e *roced+re to (oot FreeBSD "$to a s"$),e +ser 1ode to reset root *assword& I$ t#"s t"* I w",, e4*,a"$ #ow to (oot FreeBSD "$to a s"$),e +ser 1ode to reset root *assword&

Procedure: Reset FreeBSD root user password


Ste* 5 16 Start FreeBSD server7wor0stat"o$& Ste* 5 26 Press E$ter 0e- at (oot ,oader& At !e,co1e to FreeBSD8 (oot 1e$+ *ress s*ace(ar 0e- to *a+se de.a+,t (oot"$) T-*e $+1(er ' 0e- 9t-*e ' $+1(er: to (oot "$to s"$),e +ser 1ode

9c,"c0 to e$,ar)e: Ne4t -o+ w",, see t#e .o,,ow"$) *ro1*t .ro1 s-ste16 When prompted Enter full pathname of shell or RETURN for /bin/sh: Press E$ter 0e- to (oot "$to a s"$),e +ser 1ode& Ne4t, -o+ w",, (e "11ed"ate,- dro**ed "$to a s"$),e +ser 1ode w"t#o+t a root *assword& ;o+ $eed to re1o+$t 7 9root: .",e s-ste1 "$ read a$d wr"te 1ode w"t# 1o+$t co11a$d, t-*e t#e .o,,ow"$) co11a$ds6 # mount -u / # mount -a Set+* a $ew *assword w"t# t#e *asswd co11a$d .or root +ser6 # passwd Ne4t t-*e e4"t co11a$d to (oot FreeBSD "$to 1+,t"/+ser 1ode e$v"ro$1e$t6 # exit OR ;o+ ca$ <+st re(oot t#e s-ste16 # sync sync # reboot For 1ore "$.or1at"o$ see 1a$ *a)es o. *asswd a$d 1o+$t co11a$ds&

With FreeBSD 5.4 and above the booting procedure is slightly changed. Under ilder version of FreeBSD use boot -s option at O pro!pt. "o#ever$ #ith version FreeBSD 5.4% you don&t have to type any co!!and. "ere is the procedure to boot FreeBSD into a single user !ode to reset root pass#ord. 'n this tip ' #ill e(plain ho# to boot FreeBSD into a single user !ode to reset root pass#ord. )rocedure Step * +, Start FreeBSD server-#or station Step * ., )ress /nter ey at boot loader 0t Welco!e to FreeBSD1 boot !enu press spacebar ey to pause default booting 2ype nu!ber 4 ey 3type 4 nu!ber4 to boot into single user !ode 5e(t you #ill see follo#ing pro!pt fro! syste!, When pro!pted /nter full pathna!e of shell or 6/2U65 for -bin-sh, )ress /nter ey to boot into single user !ode. 5e(t$ you #ill be i!!ediately dropped into a single user !ode #ithout a root pass#ord. 7ou need to re!ount - 3root4 file syste! in read and #rite !ode #ith !ount co!!and$ type follo#ing t#o co!!ands, * !ount -u - * !ount -a Setup a ne# pass#ord #ith pass#d co!!and, * pass#d 5e(t type e(it co!!and to boot FreeBSD into !ulti-user !ode environ!ent, * e(it O6 7ou can 8ust reboot the syste!, * sync9sync * reboot

S-ar putea să vă placă și