在不同版本的Linux下以编程方式提升特权的最佳方法是? [英] Best way elevate the privileges programmatically under different versions of Linux?
本文介绍了在不同版本的Linux下以编程方式提升特权的最佳方法是?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有一种标准的方法(跨Linux发行版工作)来启动一个进程(从另一个应用程序)以请求root密码以提升特权?
There is a standard way (working across Linux distributions) to launch a process (from another application) asking for the root password in order to elevate privileges?
我尝试使用gksudo(默认情况下将其安装在ubuntu中),但在其他发行版(或其他桌面管理器)下可能未安装.
I tried to use gksudo (it is installed in ubuntu by default), but under other distributions (or under other desktop manager) it may not be installed.
推荐答案
我建议您查看 PolicyKit ,这是大多数现代发行版用来实现此目标的工具.
I would recommend looking at PolicyKit which is what most modern distros are using to accomplish this.
这篇关于在不同版本的Linux下以编程方式提升特权的最佳方法是?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文