This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 將用戶密碼用作此次腳本的變量,免於後續多次重覆輸入密碼 | |
read -s -p "輸入用戶密碼: " user_password | |
echo | |
# 解除唯讀模式 | |
if echo "$user_password" | sudo -S steamos-readonly disable; then | |
echo | |
echo "唯讀模式已解除" | |
else | |
echo -e "\e[93m密碼輸入錯誤,腳本終止。\e[0m" |