请问/sbin/nologin和/bin/false有什么区别?
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
- 木泥黑
- 帖子: 1339
- 注册时间: 2008-10-18 12:41
-
- 帖子: 1453
- 注册时间: 2008-05-24 8:30
Re: 请问/sbin/nologin和/bin/false有什么区别?
名字说明了差别。
false 总是返回 1 (跟其名字一样,false)。
false 总是返回 1 (跟其名字一样,false)。
代码: 全选
nologin(8) BSD System Manager's Manual nologin(8)
NAME
nologin -- politely refuse a login
SYNOPSIS
nologin
DESCRIPTION
Nologin displays a message that an account is not available and exits
non-zero. It is intended as a replacement shell field for accounts that
have been disabled.
If the file /etc/nologin.txt exists, nologin displays its contents
(instead of the default message) to the user.
SEE ALSO
login(1)
HISTORY
The nologin command appeared in 4.4BSD.
- 木泥黑
- 帖子: 1339
- 注册时间: 2008-10-18 12:41