Linux 遺忘 root 密碼時,可透過開機進入單用戶模式 (Single User Mode) 重設密碼。方法視開機載入程式 (LILO 或 GRUB) 而異。
lilo: 提示時輸入:linux singlepasswd 修改 root 密碼kernel /boot/vmlinuz-2.4.18-14 ro root=LABEL=/),按 esingle:kernel /boot/vmlinuz-2.4.18-14 ro root=LABEL=/ singlepasswd 修改密碼linux 開頭的那行,行尾加 single 或 init=/bin/bashinit=/bin/bash 進入後需先 mount -o remount,rw / 再 passwdsync 同步磁碟再 reboot