Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
610625b4
Commit
610625b4
authored
Feb 18, 2003
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NL-terminate the file containing the encrypted password.
parent
1b197cef
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
zpasswd.py
zpasswd.py
+2
-2
No files found.
zpasswd.py
View file @
610625b4
...
@@ -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.2
0
$ '
[
11
:
-
2
]
__version__
=
'$Revision: 1.2
1
$ '
[
11
:
-
2
]
import
sys
,
sha
,
binascii
,
random
,
getopt
,
getpass
,
os
import
sys
,
sha
,
binascii
,
random
,
getopt
,
getpass
,
os
...
@@ -78,7 +78,7 @@ def write_generated_password(home, ac_path, username):
...
@@ -78,7 +78,7 @@ def write_generated_password(home, ac_path, username):
pw
=
''
pw
=
''
for
i
in
range
(
8
):
for
i
in
range
(
8
):
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
\
n
'
%
(
username
,
generate_passwd
(
pw
,
'SHA'
)))
acfile
.
close
()
acfile
.
close
()
os
.
chmod
(
ac_path
,
0644
)
os
.
chmod
(
ac_path
,
0644
)
return
pw
return
pw
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment