On cree les homes et le repertoire de mail
darcs-hash:20050808071341-d1718-9629445b3e281b89cf531168e5b3cbb85b24166a.gz
This commit is contained in:
parent
884b56d09d
commit
675cfaccfb
1 changed files with 8 additions and 9 deletions
|
@ -71,15 +71,7 @@ class home:
|
|||
if stat[4] != int(uid) or stat[5] != config.gid :
|
||||
# Le home n'est pas -bà la bonne personne-A
|
||||
raise OSError('home existant')
|
||||
|
||||
### Mail
|
||||
try:
|
||||
os.mkdir(home + '/Mail', 0700)
|
||||
os.chown(home + '/Mail', int(uid) ,config.gid)
|
||||
except :
|
||||
# Pas grave
|
||||
pass
|
||||
|
||||
|
||||
### Quota
|
||||
status, output = commands.getstatusoutput('/usr/sbin/edquota -p pauget %s' % login )
|
||||
if status :
|
||||
|
@ -88,6 +80,13 @@ class home:
|
|||
sys.stderr.write(output+'\n')
|
||||
else :
|
||||
print OK
|
||||
|
||||
### Mail
|
||||
os.mkdir(home + '/Mail', 0700)
|
||||
os.chown(home + '/Mail', int(uid) ,config.gid)
|
||||
os.mkdir('/var/mail/' + login,0770)
|
||||
os.chown('/var/mail/' + login, int(uid) ,8)
|
||||
|
||||
except :
|
||||
print ERREUR
|
||||
if self.debug :
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue