小编nik*_*eee的帖子

在另一个用户的权限下自动执行bash脚本

有没有办法在另一个用户的权限下(自动)执行 bash 脚本?我认为“sudo”是正确的方法,但我不知道如何自动化该过程。

例如,我想运行这样的程序(用户“bla”在“blub”下运行一个进程):

sudo <the user under which i want to run the process> <path to script>
Run Code Online (Sandbox Code Playgroud)

linux script sudo privileges bash

4
推荐指数
1
解决办法
6223
查看次数

标签 统计

bash ×1

linux ×1

privileges ×1

script ×1

sudo ×1