Ubuntu终端提示The owner of /home/linuxidc/.config/ibus/bus is not root解决办法


Ubuntu 17.10在启动Samba图形界面时出错 sudo system-config-samba,在(gedit:3366): IBUS-WARNING **: The owner of ~/.config/ibus/bus is not root!找到原因

Ubuntu终端提示The owner of /home/bkjia/.config/ibus

解决办法

这是因为在修改系统文件时我们不能使用sudo命令去修改,必须使用系统内置的管理员权限。最简单的方法是使用gksudo命令启用root编辑或是sudo -i 切换。

当然你可以把你的账户权限添加到管理员权限中也是可以的,具体做法如下:

修改/etc/sudoers这个文件,内容如下:

#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults        env_reset
Defaults        mail_badpass
Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:$

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo  ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

把系统中所有的权限全部授予给root或者你的用户,只需要修改一下用户名就可以了

sudo -i

sudo -i是Linux终端命令下改变用户对命令使用权限的命令。

sudo -i是Linux终端命令下改变用户对命令使用权限的命令,例如,在Linux命令终端中,开始为“user@ubuntu:~$”,当使用该命令后,会出现输入密码的提示,之后输入密码,就会变为“root@ubuntu:~#”,这样就是改变了用户对一些命令的权限。

sudo -i后怎么退到user用户

命令进行后,输入exit即可注销。

 

相关内容