在VMware下运行Fedora Linux以root身份登入时显示鉴定故障
来源:互联网 发布:淘宝助理4.6版下载 编辑:程序博客网 时间:2024/04/27 02:36
输入命令:su -
输入root密码(此时密码不显示,直接输入)
输入命令:gedit /etc/pam.d/gdm&
在文本编辑器中注释掉"auth required pam_succeed_if.so user != root quiet"这一行
(在这一行前面加上"#",即改成#auth required pam_succeed_if.so user != root quiet)
保存后继续
输入命令:gedit /etc/pam.d/gdm-password&
同样地注释掉"auth required pam_succeed_if.so user != root quiet"这一行。
保存后退出 现在就能运用 root登录了
前提条件:解决gedit命令问题
The explanation of the problem is the following:
When you su to root from a terminal where you are logged in as another user the new "su-ed" user gonna inherit the environment variables from the parent shell user.
Example: let's say that for the user jack the DBUS_SESSION_
Now if you open a terminal as jack and make a su to root the DBUS_SESSION_
as for the user jack. And here is the problem, exactly this specific env. variable (DBUS_SESSION_
Gnome programs like gedit, nautilus . . . use the dbus protocol to communicate with gconf where application specific configurations are stored, and not just.
A program executed as root uses a different D-Bus session bus address compared when you execute that program as the jack user for instance. So the problem is that you switch to root, but the DBUS_SESSION_
Solution:
The root user has a separate dbus session address too (located in /root/.
So to use the root's dbus address when you are in a terminal and "su-ed" to root just clear the DBUS_SESSION_
A program that needs dbus communication with gconf for instance, checks that environment variable, and if it is empty it reads the dbus address from the users ~/.dbus/
To make this permanent add the following line to the root users .bashrc file:
export DBUS_SESSION_
This means that every time when you su to root and the terminal is not a login shell (the case when you are logged in as jack and opened a terminal and executed su) the DBUS_SESSION_
by the way you do not need to start a new dbus session with dbus-launch. Even if you do so but the applications still read the dbus address from the wrong place, the problem will persist.
就是在管理员用户的 .bashrc 文件尾部添加:
export DBUS_SESSION_BUS_ADDRESS=
例如,编辑 /root/.bashrc 文件,添加一行 export DBUS_SESSION_BUS_ADDRESS=“”
另外就是使用 su - root 代替su,sudo
其区别是su sudo 使用当前用户的环境变量,su - root会使用root用户的环境变量。
- 在VMware下运行Fedora Linux以root身份登入时显示鉴定故障
- 在VMware下运行Fedora Linux以root身份登入时显示鉴定故障的解决方法
- root 身份登录“鉴定故障”解决方法!
- ubuntu下以root身份成功运行chromium
- ubuntu下以root身份运行chromium和chrome
- ubuntu14.04,以root身份登入桌面!!
- 以root身份登录Linux
- linux 下以 root 身份启动 google chrome
- Linux下临时以非root身份执行命令
- 解决Chromium 不能以 root 身份运行
- 解决Chromium 不能以 root 身份运行
- ubuntu 开机以root身份运行 14.04
- php-fpm以root身份运行
- Linux下vlc以root用户运行
- linux下如何以某个用户的身份运行程序
- fedora 14 以root身份进系统设置
- 关于ubuntu下 chrom 不能以 root 身份 运行的 解决方案
- Ubuntu下配置Tomcat以指定(非root)身份运行
- 我的第一篇博客
- 使用curses管理基于文本的屏幕
- Steve Jobs 配音,苹果 1997 年的「那些疯子」广告
- ATL和MFC的C++类和HWND的映射机制
- seq_file接口
- 在VMware下运行Fedora Linux以root身份登入时显示鉴定故障
- 搭建软件框架
- 乔布斯不为外界所知贡献:打造更环保的苹果
- 乔布斯的5个难解之谜
- 有关乔布斯健康问题关键时间和事件
- 7、XML数据类型的高级应用
- Runnable Thread 线程的实现
- xml属性解析
- 纽约时报:乔布斯最后的日子