新增配置root功能

This commit is contained in:
2024-02-06 15:16:22 +08:00
parent fa20570d38
commit 0cd43e8dce
5 changed files with 25 additions and 3 deletions
Executable
+7
View File
@@ -0,0 +1,7 @@
#!/bin/bash
user=`whoami`
echo 请输入 root 密码以便正确配置 sudo 权限
sudo -u root usermod -aG sudo "$user"
sudo -u root newgrp sudo
echo 注销后即可正常使用 sudo
read