Skip to main content

USB 管理

限制非 root 用戶可存取 USB 硬碟

修改 /etc/modprobe.conf

# added by alang, this line would disable the USB drive.
install usb-storage :

重啟系統後,可以驗證設定是否生效,此設定可使以下 USB 裝置失效。

  • USB 隨身碟
  • USB 光碟機
密碼保護 GRUB

避免用戶以 single user mode 進入修改 root 密碼。

建立密碼

[root@rh4 ~]# /sbin/grub-md5-crypt
Password:
Retype password:
$1$Nk8AX$zsPr79zeiwd0zwF94DND60

修改 /boot/grub/grub.conf

增加 password 那兩行,與填入密碼的加密字串。

default=0
timeout=5

# Password Protecting GRUB
password --md5 $1$Nk8AX$zsPr79zeiwd0zwF94DND60

splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
USBGuard

可管理特定的裝置才能使用 USB 連接