pkexec visudo
==== AUTHENTICATING FOR org.freedesktop.policykit.exec ===
Authentication is needed to run `/usr/sbin/visudo' as the super user
Authenticating as: Thomas,,, (tuc) Password: polkit-agent-helper-1:
error response to PolicyKit daemon:
GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for
cookie
==== AUTHENTICATION FAILED ===
Error executing command as another user: Not authorized
This incident has been reported.
我正在通过ssh进行此操作,因为我正在执行此操作的盒子被用作没有屏幕的音乐服务器,因此无法访问。我从Ubuntu 14.04升级到16.04时发生了这种情况。我试图从另一个最近的16.04安装中复制sudoers文件,但是由于sudoers文件而无法执行此操作:
sudo mv ~/gyrf sudoers
>> /etc/sudoers: syntax error near line 36 <<<
>> /etc/sudoers: syntax error near line 37 <<<
>> /etc/sudoers: syntax error near line 38 <<<
>> /etc/sudoers: syntax error near line 39 <<<
>> /etc/sudoers: syntax error near line 40 <<<
>> /etc/sudoers: syntax error near line 41 <<<
>> /etc/sudoers: syntax error near line 42 <<<
>> /etc/sudoers: syntax error near line 43 <<<
>> /etc/sudoers: syntax error near line 44 <<<
>> /etc/sudoers: syntax error near line 45 <<<
>> /etc/sudoers: syntax error near line 46 <<<
>> /etc/sudoers: syntax error near line 47 <<<
>> /etc/sudoers: syntax error near line 48 <<<
>> /etc/sudoers: syntax error near line 49 <<<
sudo: parse error in /etc/sudoers near line 36
sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin
我应该从阁楼上拿走盒子,然后尝试pkexec visudo
还是这里出了点问题?
获取包装盒,或获取驱动器,将其安装在另一台计算机上,然后进行编辑
—
vidarlo
sudoers
以适应需要。取决于最简单的方法。
@steeldriverIt作为远程用户,它只是对我有用。JFYI。
—
php-coder
pkexec
仅允许本地用户(而不是SSH远程用户)这样做-是的,它应该在阁楼上工作