Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
slapos.package
Commits
93663ddf
Commit
93663ddf
authored
Oct 17, 2012
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable root pasword on image
parent
0c627968
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
6 deletions
+11
-6
slapprepare/slapprepare/__init__.py
slapprepare/slapprepare/__init__.py
+10
-0
slapprepare/slapprepare/script/slapos
slapprepare/slapprepare/script/slapos
+0
-5
slapprepare/slapprepare/template/sshd_config.in
slapprepare/slapprepare/template/sshd_config.in
+1
-1
No files found.
slapprepare/slapprepare/__init__.py
View file @
93663ddf
...
...
@@ -317,6 +317,10 @@ def slapserver(config):
print
"Removing %r"
%
path
if
not
dry_run
:
os
.
remove
(
path
)
# Disable login by password for root
_call
([
'passwd'
,
'-d'
,
'root'
])
finally
:
print
"SlapOS Image configuration: DONE"
return
0
...
...
@@ -554,6 +558,12 @@ def slapprepare():
configureNtp
()
if
not
config
.
update
:
print
"""WARNING: WE WILL DEACTIVATE CONNECTION TO ROOT BY PASSWORD.
If you want to enable it call '# passwd root' an set a new password
We advise you to put your public ssh key in '/root/.ssh/authorized_key'"""
# Enable and run slapos-boot-dedicated.service
_call
([
'systemctl'
,
'enable'
,
'slapos-boot-dedicated.service'
])
_call
([
'systemctl'
,
'start'
,
'slapos-boot-dedicated.service'
])
...
...
slapprepare/slapprepare/script/slapos
View file @
93663ddf
...
...
@@ -84,11 +84,6 @@ else
sed
-i
"/
${
SLAPVPN
}
/ s/^
\(
[^#]
\)
/#
\1
/g"
$SLAPOS_CONFIGURATION
/slapos.cfg
fi
# set random root password
pwgen
-sync
512 1 | passwd
--stdin
root
SLAP_INSTALL_LOG
=
/opt/slapos/slapos-install.log
while
:
;
do
...
...
slapprepare/slapprepare/template/sshd_config.in
View file @
93663ddf
PermitRootLogin
yes
PermitRootLogin
without-password
AllowUsers root
AddressFamily any
...
...
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