mirror of
https://github.com/konstruktoid/hardening.git
synced 2026-04-25 16:55:53 +03:00
[GH-ISSUE #550] Raspberry Pi 4 Ubuntu support #88
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Martin11180 on GitHub (Dec 27, 2024).
Original GitHub issue: https://github.com/konstruktoid/hardening/issues/550
Originally assigned to: @konstruktoid on GitHub.
Hallo
Can you tell me what I have to remove so that the boot works again after running the script via USB hard drive
It works via SD
I have already removed USBguard after running the script, unfortunately without success
Raspberry Pi 4 Model B Rev 1.1
PRETTY_NAME="Ubuntu 22.04.5 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.5 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
@konstruktoid commented on GitHub (Dec 27, 2024):
Have you modified https://github.com/konstruktoid/hardening/blob/master/scripts/disablemod as well? See https://github.com/konstruktoid/hardening?tab=readme-ov-file#disablemod.
@konstruktoid commented on GitHub (Dec 27, 2024):
I updated the documentation in #551
@Martin11180 commented on GitHub (Dec 27, 2024):
I plan on restarting
Removed the following file for testing
Attached is a picture of where the Rasbbery is hanging
sudo rm /etc/modprobe.d/disablefs.conf
sudo rm /etc/modprobe.d/disablemod.conf
sudo rm /etc/modprobe.d/disablenet.conf
sudo apt remove usbguard
sudo apt purge usbguard
@Martin11180 commented on GitHub (Dec 28, 2024):
OK, I apparently forgot something when I went to test it
can you build the script so that this line
can be adjusted in the config file
For example, Postfix doesn't want to be on the system
and would also like to use nano for now
Now boot from the hard drive
Have two more questions, I can't get any further with some messages
I'm not sure what to do
I'm not sure what to do
cat: /usr/bin/make: No such file or directory
I've tried everything possible, unfortunately without success
I'm not sure what to do
I'm not sure what to do
I don't know if Rassbery already exists with Grub2
From ssh audit the standard looks like this
which ones are correct
are always there again after a restart
I haven't posted anything else, so I know what I have to do
Your answer may also help others with this problem
@konstruktoid commented on GitHub (Dec 28, 2024):
For now you'll need to manually update the functions.
And if you don't have any particular reason to pass all the tests, there's no need to pay any attention to them.
For example, if you don't need
makeon you system there's no point of installing it just to pass the test.What does
grep -E '^\$FileCreateMode 06(0|4)0$' /etc/rsyslog.confreturn?@Martin11180 commented on GitHub (Dec 28, 2024):
grep -E '^$FileCreateMode 06(0|4)0$' /etc/rsyslog.conf
$FileCreateMode 0600
but OpenSSH sftp is not in your description either
and with the exchange, cipher, and MAC algorithm it would also be interesting, which is currently a problem because of security
@konstruktoid commented on GitHub (Dec 28, 2024):
so the test should have caught that.
which problem of security? because the configuration doesn't match
sshaudit.com? Adapt the configuration to suit your needs, don't just follow an recommendation. Neither complies to FIPS 140-2 for example.@Martin11180 commented on GitHub (Feb 4, 2025):
Hello
I'm building a server for the first time and it's a bit confusing which cipher and MAC algorithms are correct, yours or those from sshaudit.com
Have you changed anything in the code when I run through your script, I can no longer get in via ssh
and also I get without root when I type cd
-bash: cd: /home/username: Permission denied
additionally execute this command
the command cd command and ssh login works
sudo chown -R $USER:$USER $HOME
greet
Martin
@konstruktoid commented on GitHub (Feb 5, 2025):
No, the last update was https://github.com/konstruktoid/hardening/pull/551.
The correct ssh configuration is the one that suits your needs and complies with any regulation you need to follow, Mozilla got more configuration examples https://infosec.mozilla.org/guidelines/openssh.
Note that the code is not idempotent, so running it multiple times will create all sort of problems.
@Martin11180 commented on GitHub (Feb 5, 2025):
Hello
I don't know what to do anymore
It ran with your code the whole time
Not for a few days
I have now reset my cloud init file to minimal
Close to the setup everything still works
Then I execute these commands
After that ssh goes and home order for example cannot be called
Permission denied comes up
Do you see an error somewhere?
I'm trying to limit the error
Here are three messages, I don't know if they were there before
ln: failed to create symbolic link '/etc/systemd/system/default.target.wants/tmp.mount': No such file or directory
Can't exec "/tmp/libpam0g.config.em44zQ": Permission denied at /usr/lib/aarch64-linux-gnu/perl-base/IPC/Open3.pm line 178.
open2: exec of /tmp/libpam0g.config.em44zQ configure 1.4.0-11ubuntu2.4 failed: Permission denied at /usr/share/perl5/Debconf/ConfModule.pm line 59.
@Martin11180 commented on GitHub (Feb 6, 2025):
Hello
I have now started every function disable and enable and f_pre enable and this error occurs with the function f_adduser
@konstruktoid commented on GitHub (Feb 6, 2025):
could you run the code with
bash -x?@Martin11180 commented on GitHub (Feb 7, 2025):
Hello
I don't understand it
a setup without cloud-init, the rights of /home look like this
drwxr-x--- 4 charlie charlie 83 Feb 7 01:18 charlie
and your script runs through and everything works afterwards
with cloud init setup it looks like this
drwxr-xr-x 4 root root 36 Feb 7 03:02 charlie
according to the script then like this
drwxr-x--- 5 root root 53 Feb 7 15:23 charlie
-bash: cd: charlie: Permission denied cd /home
I reduced the cloud init again without success
Why did it work all the time before, I can't find which owner should be now
@konstruktoid commented on GitHub (Feb 10, 2025):
I can't reproduce this.
@Martin11180 commented on GitHub (Feb 12, 2025):
Hello
With a setup via cloud init
There must be something wrong with Cloud-init config
For me, root is the owner instead of charlie