我的问题是:我不能将CentOS 7上的用户‘学生’的默认shell设置为fish-shell。我通过下载.gz、配置、制作、制作安装来安装fish-shell。
output of which fish
/usr/local/bin/fish从标准的‘学生’帐户运行su,我可以将自己提升到根,将该鱼设置为默认shell。但当我跑
student@localhost ~> whoami
root
student@localhost ~>
/root
student@localhost ~> sudo chsh -s /usr/local/bin/fish student
Changing shell for student.
chsh: user attribute not changed: Invalid contents of lock `/etc/passwd.lock`查看/etc/passwd,我可以看到没有发生任何更改。
知道我能做什么吗?看来锁文件在阻止我继续前进。
发布于 2016-02-13 06:15:51
看起来,您以前试图更改/etc/passwd文件的尝试之一在锁文件中留下了一些垃圾。
该锁定文件防止多个可能相互取消的更新。如果您是唯一使用该系统的人,请删除文件/etc/passwd.lock,然后重试。
https://unix.stackexchange.com/questions/261968
复制相似问题