diff --git a/attributs.py b/attributs.py index d1d58d4..3dd03eb 100644 --- a/attributs.py +++ b/attributs.py @@ -524,8 +524,27 @@ class loginShell(Attr): can_modify = ["self", "Nounou", "Cableur"] def parse_value(self, shell, ldif): - with open('/etc/shells') as f: - shells = [ l.strip() for l in f.readlines() if not l.startswith('#') ] + #with open('/etc/shells') as f: + # shells = [ l.strip() for l in f.readlines() if not l.startswith('#') ] + shells=['/bin/csh', + '/bin/sh', + '/usr/bin/es', + '/usr/bin/ksh', + '/bin/ksh', + '/usr/bin/rc', + '/usr/bin/tcsh', + '/bin/tcsh', + '/usr/bin/esh', + '/bin/bash', + '/bin/rbash', + '/bin/zsh', + '/usr/bin/zsh', + '/usr/bin/screen', + '/bin/dash', + '/usr/bin/rssh', + '/usr/local/bin/disconnect_shell', + '/usr/scripts/surveillance/disconnect_shell', + ''] if (shell not in shells): raise ValueError("Shell %s invalide" % shell) self.value = shell