Jump to content
View in the app

A better way to browse. Learn more.

PHP论坛人

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

首次登入後立即更改root密碼

Featured Replies

-------------------------------

首次登入後立即更改root密碼

-------------------------------

為什麼要立即更改root密碼?

在首次透過SSH登入伺服器 (或DD Debian完成後),建議立刻更改root密碼,以提升系統安全性,避免預設或弱密碼帶來的風險

執行密碼更改指令

passwd

系統會依序提示以下訊息

New password: 輸入新密碼

Retype new password: 再次輸入新密碼以確認

請輸入兩次相同的新密碼,輸入時密碼不會顯示於畫面

密碼應具備一定強度,建議包含英文字母大小寫、數字及特殊符號,長度建議在12個字元以上

若密碼過於簡單,系統可能會顯示警告訊息,但仍可強制使用 (不建議忽略)

成功更改密碼後,將顯示:password updated successfully

驗證密碼是否更新成功,登出系統

exit

重新使用SSH登入,並使用新密碼登入,若成功即表示密碼已正確更新

注意事項

若忘記root密碼,通常需透過以下方式重設:

主機商提供的 Console / VNC / 救援模式

開機時進入 GRUB 選單,編輯啟動參數

進入 單人模式 (Single User Mode),使用passwd重新設定

不同主機商或虛擬化平台的操作方式略有差異,請參考官方文件

Edited by Jack

Create an account or sign in to comment

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.