Ubuntu 中以其他身分執行命令

| 0 Comments| | 20:01
Categories:
sudo -H -u otheruser bash -c 'echo "I am $USER, with uid $UID"'

Source: Run a shell script as another user that has no password

Leave a Reply

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *