diff --git a/gestion/gen_confs/adherents.py b/gestion/gen_confs/adherents.py index 35191c1d..eff34bde 100644 --- a/gestion/gen_confs/adherents.py +++ b/gestion/gen_confs/adherents.py @@ -53,6 +53,8 @@ class del_user: login, home = args.split(',') if not login or not home: raise ValueError('Argument invalide') + if home.startswith('/home/') and hostname == "fx": + home = "/home-adh/" + home[6:] warn = '' f = '%s/files/%s_%s.tar.bz2' % (config.cimetiere, strftime('%Y-%m-%d-%Hh%Mm'), @@ -103,6 +105,8 @@ class home: anim('\t' + args) try: home, uid, login = args.split(',') + if home.startswith('/home/') and hostname == "fx": + home = "/home-adh/" + home[6:] ### Home if not os.path.exists(home): # Le home n'existe pas @@ -128,8 +132,8 @@ class home: ### Mail os.mkdir(home + '/Mail', 0700) os.chown(home + '/Mail', int(uid), config.gid) - os.mkdir('/home/mail/' + login, 0770) - os.chown('/home/mail/' + login, int(uid), 8) + os.mkdir('/home-adh/mail/' + login, 0770) + os.chown('/home-adh/mail/' + login, int(uid), 8) except: print ERREUR