[attributs] Liste des shell dans gestion.config
This commit is contained in:
parent
ed3b43073c
commit
f8036659a6
1 changed files with 2 additions and 24 deletions
26
attributs.py
26
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue