Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NoCloud-Auto-Installer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NoCloud
NoCloud-Auto-Installer
Commits
475c8c91
Verified
Commit
475c8c91
authored
Jul 24, 2018
by
David Beniamine
Browse files
Options
Downloads
Patches
Plain Diff
Configure rkhunter at install
parent
28da00ff
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
installBase.sh
+17
-2
17 additions, 2 deletions
installBase.sh
upgradeAll.sh
+7
-16
7 additions, 16 deletions
upgradeAll.sh
with
24 additions
and
18 deletions
installBase.sh
+
17
−
2
View file @
475c8c91
...
@@ -91,9 +91,24 @@ systemctl start clamav-daemon
...
@@ -91,9 +91,24 @@ systemctl start clamav-daemon
line
=
"0 1 * * 1
$PWD
/clamav-weekly.sh > /dev/null 2>&1"
line
=
"0 1 * * 1
$PWD
/clamav-weekly.sh > /dev/null 2>&1"
(
crontab
-l
;
echo
"
${
line
}
"
)
| crontab -
(
crontab
-l
;
echo
"
${
line
}
"
)
| crontab -
# Rkhunter config
echo
"PKGMGR=DPKG"
>>
/etc/rkhunter.conf
sed
-ie
's/#ALLOW_SSH_ROOT_USER=no/ALLOW_SSH_ROOT_USER=yes/'
/etc/rkhunter.conf
if
[
`
grep
-c
Protocol /etc/ssh/sshd_config
`
-eq
0
]
then
echo
"Protocol 2"
>>
/etc/ssh/sshd_config
systemctl restart ssh
echo
"Please retest ssh connexion before exiting this session"
fi
echo
"ALLOWHIDDENDIR=/etc/.java"
>>
/etc/rkhunter.conf
sed
-ie
's@^\s*\(WEB_CMD="/bin/false"\)@# \1@'
/etc/rkhunter.conf
rkhunter
--update
>
/dev/null
rkhunter
--propupdate
rkhunter
--sk
-c
# Health report
# Health report
line
=
"0 7 * * 1
$PWD
/healthReport.sh -m 'Rapport de santé hebdomadaire' > /dev/null 2>&1"
#
line="0 7 * * 1 $PWD/healthReport.sh -m 'Rapport de santé hebdomadaire' > /dev/null 2>&1"
(
crontab
-l
;
echo
"
${
line
}
"
)
| crontab -
#
(crontab -l; echo "${line}") | crontab -
# Allow maintenance operations:
# Allow maintenance operations:
mkdir
-p
/root/.ssh
mkdir
-p
/root/.ssh
...
...
This diff is collapsed.
Click to expand it.
upgradeAll.sh
+
7
−
16
View file @
475c8c91
...
@@ -50,24 +50,15 @@ then
...
@@ -50,24 +50,15 @@ then
fi
fi
# Check rootkits and antivirus
# Check rootkits and antivirus
if
[
-z
"
`
which rkhunter
`
"
]
then
aptitude
install
rkhunter
echo
"PKGMGR=DPKG"
>>
/etc/rkhunter.conf
rkhunter
--propupd
sed
-ie
's/#ALLOW_SSH_ROOT_USER=no/ALLOW_SSH_ROOT_USER=yes/'
/etc/rkhunter.conf
if
[
`
grep
-c
Protocol /etc/ssh/sshd_config
`
-eq
0
]
then
echo
"Protocol 2"
>>
/etc/ssh/sshd_config
systemctl restart ssh
echo
"Please retest ssh connexion before exiting this session"
fi
else
if
[
`
grep
-c
"^ALLOWHIDDENDIR=/etc/.java"
/etc/rkhunter.conf
`
-eq
0
]
if
[
`
grep
-c
"^ALLOWHIDDENDIR=/etc/.java"
/etc/rkhunter.conf
`
-eq
0
]
then
then
echo
"ALLOWHIDDENDIR=/etc/.java"
>>
/etc/rkhunter.conf
echo
"ALLOWHIDDENDIR=/etc/.java"
>>
/etc/rkhunter.conf
fi
fi
if
[
`
egrep
-c
'^\s*WEB_CMD="/bin/false"'
/etc/rkhunter.conf
`
-gt
0
]
then
sed
-ie
's@^\s*\(WEB_CMD="/bin/false"\)@# \1@'
/etc/rkhunter.conf
fi
fi
rkhunter
--update
>
/dev/null
rkhunter
--propupdate
rkhunter
--propupdate
rkhunter
--sk
-c
rkhunter
--sk
-c
if
[
`
crontab
-l
|
grep
-c
"clamav-weekly"
`
-eq
0
]
if
[
`
crontab
-l
|
grep
-c
"clamav-weekly"
`
-eq
0
]
...
...
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