라즈베리파이 비밀번호 리셋(초기화) 방법
(출처: http://www.raspberrypi-spy.co.uk/2014/08/how-to-reset-a-forgotten-raspberry-pi-password )
Step 1 – Grab The SD Card
Power down the Pi and remove the SD card. Insert it into your PC.
Step 2 – Edit cmdline.txt
The boot partition should be visible and contain a file named “cmdline.txt”. Edit this file in a text editor and add the following to the end of the existing text :
init=/bin/sh
If the original content was :
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
it should now look like :
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait init=/bin/sh
Make sure it is all one line! Save the text file and eject the SD card from the PC.
Step 3 – Reset the Password
Insert the card into a Pi that is connected to a monitor and keyboard. Power up the Pi. There may be a delay but you should be presented with a flashing cursor.
At the prompt type the following command :
passwd pi
You will then be prompted for a new password. Enter it carefully and press the [Return] key. It will now ask you to retype the password.
The password has been changed.
Now type the following commands :
sync exec /sbin/init
The Pi will continue to boot and return you to the normal command line prompt.
Shutdown the Pi and power it off.
sudo halt
Step 4 – Edit cmdline.txt
Using the PC edit the “cmdline.txt” file again and remove the “init=/bin/sh” text you added in Step 2.
You can now return the SD card to your Pi, reboot and use the new password.
감사합니다.
자세한 내용은 http://sns4u.tistory.com/191?category=773568 을 참고하시길.
'IoT-라즈베리파이,비글본' 카테고리의 다른 글
BeagleBone Black을 노트북(or PC)에 USB미니로 연결 후, OS업그레이드 / 노트북이 사용 중인 인터넷공유방법: 비글본 블랙 (0) | 2021.07.17 |
---|---|
라즈베리 파이(raspberry pi)에 라즈비안(raspbian) 설치 후 모니터 없이 진행 (0) | 2015.05.12 |
댓글