Author Topic: ลืม passwd ที่ debian 4.0  (Read 6972 times)

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
ลืม passwd ที่ debian 4.0
« on: มกราคม 24, 2011, 12:23:39 PM »
ก่อนอื่นก็ ลืมให้รู้ว่าลืม อิอิ
มีสติก่อน
ไม่ยากไรครับ เดินไปหน้าเครื่อง
รีบูตเข้า grub เมื่อมาถึงให้กด ตัว e เลื่อนลงมาที่
คำว่า kernel แล้วพิมพ์ต่อท้าย เป็น

???? ro linux single init=/bin/sh

แล้วกด ตัว "b" ให้ boot

เมื่อมาถึง sh:3.1#
ก็ทำการ #mount -n -o remount,rw /
#cd /etc/
#cp passwd passwd.ori
#cp shadow shadow.ori
#nano shadow
จะเห็น root:weeWRSF!sfDFs:12581:0:99999:7:::
ลบ ตั้งแต่ ::ที่หนึ่ง ไปคือลบ weeWRSF! ไปจนถึง : ที่สอง
แล้วทำการ safe

แล้วรีบูต หนึ่งครั้ง เมื่อมาถึงหน้า login ก็ user = root ,
enter

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: ลืม passwd ที่ debian 4.0
« Reply #1 on: พฤศจิกายน 19, 2016, 07:34:15 PM »
ถ้า OS ที่ใช้งานเป็น CentOS,redhat ตระกูลต่างๆ เข้าในบันทัด kernel แล้วเพิ่มหลัง ro quiet splash
single fastboot

The 'single' term is for booting into single user mode, but 'fastboot' is used to skip certain parts of the booting sequence. This is useful if your system is permanently stuck in a file system check.

ถ้า OS ที่ใช้งานเป็น Debian/Ubuntu ตระกูลต่างๆ เข้าในบันทัด kernel แล้วเพิ่มหลัง ro quiet splash

init=/bin/bash

เสร็จทำการกด ตัว 'b' เพื่อ boot เข้าระบบ