要将用户设置为管理员,您需要遵循以下步骤:
usermod -aG wheel username 这将将用户添加到wheel组,该组具有sudo权限。 注意:将"username"替换为要添加为管理员的实际用户名。
visudo ## Allow root to run any commands anywhere root ALL=(ALL) ALL ## Allow members of the wheel group to execute any command %wheel ALL=(ALL) ALL 现在,指定的用户应该具有管理员权限,并可以使用sudo命令进行特权操作。