Commit 2c158536 authored by Lennart Regebro's avatar Lennart Regebro

Mode numbers should be in octal. My bad.

parent 6174ec71
...@@ -39,7 +39,7 @@ for all necessary information. The available options are: ...@@ -39,7 +39,7 @@ for all necessary information. The available options are:
information in (usually "inituser" or "access"). information in (usually "inituser" or "access").
""" """
__version__='$Revision: 1.19 $ '[11:-2] __version__='$Revision: 1.20 $ '[11:-2]
import sys, sha, binascii, random, getopt, getpass, os import sys, sha, binascii, random, getopt, getpass, os
...@@ -80,7 +80,7 @@ def write_generated_password(home, ac_path, username): ...@@ -80,7 +80,7 @@ def write_generated_password(home, ac_path, username):
pw = pw + random.choice(pw_choices) pw = pw + random.choice(pw_choices)
acfile.write('%s:%s' % (username, generate_passwd(pw, 'SHA'))) acfile.write('%s:%s' % (username, generate_passwd(pw, 'SHA')))
acfile.close() acfile.close()
os.chmod(ac_path, 644) os.chmod(ac_path, 0644)
return pw return pw
def write_access(home, user='', group=''): def write_access(home, user='', group=''):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment