请问/sbin/nologin和/bin/false有什么区别?

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
头像
木泥黑
帖子: 1339
注册时间: 2008-10-18 12:41

请问/sbin/nologin和/bin/false有什么区别?

#1

帖子 木泥黑 » 2009-01-05 11:47

搞不懂了~>_<~
aerofox
帖子: 1453
注册时间: 2008-05-24 8:30

Re: 请问/sbin/nologin和/bin/false有什么区别?

#2

帖子 aerofox » 2009-01-05 13:11

名字说明了差别。
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

Re: 请问/sbin/nologin和/bin/false有什么区别?

#3

帖子 木泥黑 » 2009-01-05 16:36

不太懂,还是谢谢
回复