[./gestion/gen_confs/droits.py] Le shell sur ragnarok est maintenant le même que celui configuré dans ldap
darcs-hash:20090903200411-8fbb1-8239a520c6806649b3b5e531b1069431ebb16575.gz
This commit is contained in:
parent
de82f3dae8
commit
571c5bc959
1 changed files with 11 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
#! /usr/bin/env python
|
||||
# -*- coding: iso-8859-15 -*-
|
||||
|
||||
import sys, signal, os
|
||||
import sys, signal, os, re
|
||||
|
||||
# Imports pour LDAP
|
||||
sys.path.append('/usr/scripts/gestion')
|
||||
|
@ -200,6 +200,15 @@ class droits_openbsd(droits) :
|
|||
if fonction == "Nounou":
|
||||
# On rajoute à /etc/group
|
||||
group = "%s,%s" % (group, a._data['uid'][0])
|
||||
#On conserve le shell
|
||||
#Il faut ôter les emplacements spécifique à linux (type
|
||||
#/usr/bin/zsh)
|
||||
if re.search("zsh",a._data['loginShell'][0]):
|
||||
shell = "/bin/zsh"
|
||||
elif re.search("bash",a._data['loginShell'][0]):
|
||||
shell = "/bin/bash"
|
||||
else:
|
||||
shell = "/bin/zsh"
|
||||
# On ajoute dans master
|
||||
# Le mot de passe est bidon
|
||||
master = "%s%s:$1$rQcJgpD8$ZZjjszWKnSp9rR6iZ9GPm2:%s:1000:ldap:0:0:%s:%s:%s\n" % (master,
|
||||
|
@ -207,7 +216,7 @@ class droits_openbsd(droits) :
|
|||
a._data['uidNumber'][0],
|
||||
a._data['gecos'][0],
|
||||
a._data['homeDirectory'][0],
|
||||
"/bin/zsh")
|
||||
shell)
|
||||
|
||||
group = "%s\n" % group
|
||||
# On va réécrire /etc/master.passwd
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue