使所有用户提供应用程序

发布于 2025-02-11 19:11:15 字数 413 浏览 1 评论 0原文

我是我的服务器的Sudo用户(main_user)(redhat8),并有许多用户帐户(user1,user2,....)。 我可以使用 main_user 帐户在服务器中运行已安装的应用程序,但是其他用户无法执行程序或运行该应用程序。

**我已经从 main_user 帐户中安装了应用程序/程序,该帐户不是root用户,而是拥有sudo的预期。

可以将应用程序和程序也可用于其他用户。

我尝试的是:

我都在 ./ bashrc profile.d/all_user.sh 中都使它们成为了别名,但没有运气。

I am the sudo user (main_user) of my server (redhat8) and have many user accounts (user1, user2,....).
I can run installed application in server using main_user account but the other users are not able to execute the program or run the application.

** I have installed the applications/programs from main_user account which is not a root user but having sudo previlages.

What can be done to make the application and programs available to other users as well.

What I tried:

I have made alias in both ./bashrc and profile.d/all_user.sh, and source them but no luck.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心在旅行 2025-02-18 19:11:15

您可以实现sudo。首先在/etc/sudoers文件添加行类似于:

user1,user2,user2    ALL=/path/to/the/program

如果以上用户在特定组中,则可以添加类似的内容:

%usergroup   ALL=/path/to/the/program

并运行类似的程序:

sudo -u main_user /path/to/the/program

You can implement sudo. First in /etc/sudoers file add line like:

user1,user2,user2    ALL=/path/to/the/program

If the users above are in specific group you can add something like:

%usergroup   ALL=/path/to/the/program

And run the program like:

sudo -u main_user /path/to/the/program
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文