使用 consolehelper 时获取 'Insufficient rights' 和 'userhelper must be setuid root' error/warning

Getting 'Insufficient rights' and 'userhelper must be setuid root' error/warning while using consolehelper

'/usr/bin/myapp' 是 link 到 '/usr/bin/consolehelper'。

当非 root 用户在命令提示符下尝试 运行 '/usr/bin/myapp' 时,它显示 'userhelper must be setuid root'。但是 运行 'sudo /usr/bin/myapp' 它工作正常。

使用 GUI 时,会显示“权限不足”弹出窗口。我尝试通过更改相关文件 '/etc/security/console.apps/myapp' 和 '/etc/pam.d/myapp'.

的权限

我在打开“系统->管理->用户和组”时收到相同的弹出窗口。

我得到了解决方案!问题是缺少 /usr/sbin/userhelper 的 setuid 位。我使用以下命令进行设置:

chmod u+s /usr/sbin/userhelper

这将权限从“-rwx--x--x”更改为“-rws--x--x” '