Bash不能扮演没人和nogroup吗?


10

我有一个由nobody:创建的日志文件,该日志文件nogroup正在记录活动,我想模拟向该日志文件添加消息。我的第一个想法是:

$ sudo su nobody
This account is currently not available.

Answers:


20

您有一种更简单的解决方案,只需运行:(用您选择的外壳su -s /bin/bash nobody代替/bin/bash)。

This account is currently not available.错误是由于以下事实造成的:nobody用户默认外壳程序为/usr/sbin/nologinsu -s强制系统使用其他外壳程序。


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.