Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
snf-image-creator
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
itminedu
snf-image-creator
Commits
8a0fee58
Commit
8a0fee58
authored
10 years ago
by
Nikos Skalkotos
Browse files
Options
Downloads
Patches
Plain Diff
Remove cleanup_password sysprep from freebsd.py
bsd.py already contains it.
parent
d23abb79
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
image_creator/os_type/freebsd.py
+1
-26
1 addition, 26 deletions
image_creator/os_type/freebsd.py
with
1 addition
and
26 deletions
image_creator/os_type/freebsd.py
+
1
−
26
View file @
8a0fee58
...
...
@@ -17,7 +17,7 @@
"""
This module hosts OS-specific code for FreeBSD.
"""
from
image_creator.os_type.bsd
import
Bsd
,
sysprep
from
image_creator.os_type.bsd
import
Bsd
import
re
...
...
@@ -25,31 +25,6 @@ import re
class
Freebsd
(
Bsd
):
"""
OS class for FreeBSD Unix-like operating system
"""
@sysprep
(
"
Cleaning up passwords & locking all user accounts
"
)
def
_cleanup_password
(
self
):
"""
Remove all passwords and lock all user accounts
"""
master_passwd
=
[]
for
line
in
self
.
image
.
g
.
cat
(
'
/etc/master.passwd
'
).
splitlines
():
# Check for empty or comment lines
if
len
(
line
.
split
(
'
#
'
)[
0
])
==
0
:
master_passwd
.
append
(
line
)
continue
fields
=
line
.
split
(
'
:
'
)
if
fields
[
1
]
not
in
(
'
*
'
,
'
!
'
):
fields
[
1
]
=
'
!
'
master_passwd
.
append
(
"
:
"
.
join
(
fields
))
self
.
image
.
g
.
write
(
'
/etc/master.passwd
'
,
"
\n
"
.
join
(
master_passwd
)
+
'
\n
'
)
# Make sure no one can login on the system
self
.
image
.
g
.
rm_rf
(
'
/etc/spwd.db
'
)
def
_check_enabled_sshd
(
self
):
"""
Check if the sshd is enabled at boot
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment