Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
1ab1c8d3
Commit
1ab1c8d3
authored
Nov 04, 2012
by
Nigel Metheringham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Take SHADOWFILE from existing user object rather than class
parent
75a2b2ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
library/user
+2
-2
No files found.
library/user
View file @
1ab1c8d3
...
@@ -407,8 +407,8 @@ class User(object):
...
@@ -407,8 +407,8 @@ class User(object):
return
passwd
return
passwd
else
:
else
:
# Read shadow file for user's encrypted password string
# Read shadow file for user's encrypted password string
if
os
.
path
.
exists
(
User
.
SHADOWFILE
)
and
os
.
access
(
User
.
SHADOWFILE
,
os
.
R_OK
):
if
os
.
path
.
exists
(
self
.
SHADOWFILE
)
and
os
.
access
(
self
.
SHADOWFILE
,
os
.
R_OK
):
for
line
in
open
(
User
.
SHADOWFILE
)
.
readlines
():
for
line
in
open
(
self
.
SHADOWFILE
)
.
readlines
():
if
line
.
startswith
(
'
%
s:'
%
self
.
name
):
if
line
.
startswith
(
'
%
s:'
%
self
.
name
):
passwd
=
line
.
split
(
':'
)[
1
]
passwd
=
line
.
split
(
':'
)[
1
]
return
passwd
return
passwd
...
...
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