
我有 2 台 Linux 機器,1 個 VPS 和 1 個樹莓派
問題:
例如,當呼叫根函數時,service "a service" restart
這兩種情況看起來不同。有些用戶沒有顯示為可能的身份驗證用戶,即使他們在這兩種情況下都是 sudoers
虛擬專用伺服器:
Authentication is required to manage system services or units.
Multiple identities can be used for authentication:
1. user1
2. cybex
3. ,,, (backup-user)
4. steam
Choose identity to authenticate as (1-4):
樹莓派
user1 和 cybex 都是使用者和 sudoers(使用者位於 sudoers 檔案中且是 sudo 群組的一部分),但它們未列出。
Authentication is needed to run `/usr/bin/nano' as the super user
Multiple identities can be used for authentication:
1. ,,, (pi)
2. root
Choose identity to authenticate as (1-2):
為什麼會發生這種情況並且有所不同?
答案1
答案2
sudo
將您自己加入文件中的群組中/etc/group