
Reviewed-by: Aline Manera <alinefm@linux.vnet.ibm.com> On 08/11/2014 01:04 PM, shaohef@linux.vnet.ibm.com wrote:
From: Simon Jin <simonjin@linux.vnet.ibm.com>
The backend should fitler the user name who can not login the shell.
Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com> Signed-off-by: Simon Jin <simonjin@linux.vnet.ibm.com> --- src/kimchi/model/host.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/kimchi/model/host.py b/src/kimchi/model/host.py index a1f8944..39f45d8 100644 --- a/src/kimchi/model/host.py +++ b/src/kimchi/model/host.py @@ -419,7 +419,8 @@ def __init__(self, **kargs): pass
def get_list(self): - return [user.pw_name for user in pwd.getpwall()] + return [user.pw_name for user in pwd.getpwall() + if user.pw_shell.rsplit("/")[-1] not in ["nologin", "false"]]
class GroupsModel(object):