diff --git a/attributs.py b/attributs.py index e80ce91..54ffa6e 100644 --- a/attributs.py +++ b/attributs.py @@ -1262,31 +1262,9 @@ class loginShell(Attr): def parse_value(self, shell): #with open('/etc/shells') as f: # shells = [ l.strip() for l in f.readlines() if not l.startswith('#') ] - shells = [u'/bin/csh', - u'/bin/sh', - u'/usr/bin/es', - u'/usr/bin/ksh', - u'/bin/ksh', - u'/usr/bin/rc', - u'/usr/bin/tcsh', - u'/bin/tcsh', - u'/usr/bin/esh', - u'/bin/bash', - u'/bin/rbash', - u'/bin/zsh', - u'/usr/bin/zsh', - u'/usr/bin/screen', - u'/bin/dash', - u'/usr/bin/rssh', - u'/usr/local/bin/disconnect_shell', - u'/usr/scripts/surveillance/disconnect_shell', - u'/usr/local/bin/badPassSh', - u'/usr/bin/passwd', - u'/bin/false', - u'/usr/sbin/nologin' - u''] + shells = config.shells_possibles if shell not in shells: - raise ValueError("Shell %r invalide" % shell) + raise ValueError("Shell %r invalide.\nLes shells valident sont : %s" % (shell, ', '.join(shells))) self.value = shell @crans_attribute