我希望将LightDM恢复到它的默认状态,因为出于某种原因
/etc/lightdm/unity-greeter.conf现在是一个空文件。
删除/etc/lightdm/unity-greeter.conf,然后运行sudo apt-get install --reinstall unity-greeter并不会像您预期的那样创建一个新的配置文件。
如何恢复缺少的配置文件?
发布于 2017-08-06 20:56:32
找到拥有配置文件的包:
dpkg --search /etc/path/to/config它将输出类似以下内容的内容:
unity-greeter: /etc/lightdm/unity-greeter.conf因此,包名为“团结-问候”,下载该软件包:
apt-get download unity-greeter然后将其文件系统树数据提取为tar文件:
dpkg-deb --fsys-tarfile unity-greeter_version-0ubuntu1_amd64.deb > pkg.tar最后,只提取您想要的任何位置的确切配置:
tar -Oxf pkg.tar ./etc/lightdm/unity-greeter.conf |
sudo tee /etc/lightdm/unity-greeter.conf ./etc/lightdm/unity-greeter.conf是我们存档中的文件名。/etc/lightdm/unity-greeter.conf是我把它发送给存储的地方。或者,就像穆鲁建议的那样,我们可以在一个班轮上这样做:
dpkg-deb --fsys-tarfile unity-greeter_version-0ubuntu1_amd64.deb |
sudo tar -x -C / ./etc/lightdm/unity-greeter.conf发布于 2011-10-14 23:45:23
根据Ubuntu论坛上的这线程,它就像在终端中运行以下内容一样简单:
sudo dpkg-reconfigure lightdm发布于 2017-07-27 12:49:40
我在Ubuntu17.04上也有同样的问题。postinstall使用来自/usr/share/openssh/的模板。它检查是否启用rootlogin,设置此选项并将其复制到/etc/ssh。之后,它会执行一些ucf和ucfr调用(我不知道这是为了什么)。
只需将/usr/share/openssh/sshd_config复制到/etc/ssh/sshd_config:
sudo cp /usr/share/openssh/sshd_config /etc/ssh/sshd_config现在,根据需要调整您的sshd_config。
https://askubuntu.com/questions/66533
复制相似问题