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
cdfa81d9
Commit
cdfa81d9
authored
Nov 01, 2012
by
Nigel Metheringham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added some documentation to the classes
parent
9a254595
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
library/user
+29
-0
No files found.
library/user
View file @
cdfa81d9
...
...
@@ -165,6 +165,25 @@ except:
class
User
(
object
):
"""
This is a generic User manipulation class - generic in this case
meaning it is aimed at Linuxish platforms using useradd/userdel/usermod
On object creation it will load the most appropriate subclass based
on the platform and distribution.
A subclass may wish to override the following action methods:-
- create_user()
- remove_user()
- modify_user()
- ssh_key_gen()
- ssh_key_fingerprint()
The main function also uses the following User methods to decide
what to do:-
- user_exists()
All subclasses MUST define platform and distribution (which may be None).
"""
platform
=
'Generic'
distribution
=
None
...
...
@@ -484,6 +503,16 @@ class User(object):
# ===========================================
class
FreeBSD_User
(
User
):
"""
This is a FreeBSD User manipulation class - it uses the pw command
to manipulate the user database, followed by the chpass command
to change the password.
This overrides the following methods from the generic class:-
- create_user()
- remove_user()
- modify_user()
"""
platform
=
'FreeBSD'
distribution
=
None
...
...
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