Note book to help you and me remember some tricks

Category Linux

Ansible.builtin.script triggers permission denied on Oracle Linux

You have some Oracle Linux servers targeted by your ansible playbooks. You have your_playbook.yml that contains the following task: (The become and become_user instructions are not required to reproduce the error) If you got an error, just add the -vvv… Continue Reading →

How install and configure Clamav antivirus as a background process notifying you by email when a threat is detected

In the following post we will work on a rocky Linux server (RHEL). Install EPEL Repository The Rocky Linux base repo does not contain packages for installing Clamv. Install Clamav Set SELinux for Clamav freshclam: run Virus database signature update… Continue Reading →

OCI: increase the size of a block volume that is attached to a single instance (not shareable block volume)

Go to the instance where you have attached your block volume. Now go to the ssh terminal of this instance and execute: You can see your block volume has been mounted on /fortest Now in OCI console, increase by 1G… Continue Reading →

OCI: attach a new block volume to a single host

In the OCI console, go to the block volumes menu and create a block volume. Choose in which compartment you want to create your block volume (same compartment as your host), and choose a custom size. Let the other settings… Continue Reading →

Management of permissions on a mount point with Linux SGID and Linux group + ansible example

For the purpose of this article, I give you an existing context. Imagine you have one server share.yourdomain.com that is an NFS server, and that shares a directory that we have named /heapdump Now imagine you have ten other linux… Continue Reading →

Error 500 after securing your wazuh installation

if you follow the step-by-step guide to install wazuh, you will also get to the step “securing your wazuh installation” in which a command is provided to replace all the default passwords: Then if you go back to your dashboard… Continue Reading →

Ansible shell execution: no environment variable are loaded

When you execute shell script with ansible module ansible.builtin.shell, bash is invoked as a non-interactive login shell. Consequently, environment variables from the user are not loaded. If you execute man bash, you’ll see: The solution is juste to explicitly load… Continue Reading →

dkim=none (message not signed) when emails sent not locally

You’ve configured opendkim for your smtp server but when clients use your smtp servers emails are not signed. By default opendkim trust only local host, you have to specified all the host to trust. Uncomment the following line in opendkim.conf:… Continue Reading →

==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ====

You are on a CentOS server, connected as a non-root user, for example here as the user owner of the tomcat installation folder, let’s call it mytomcatuser. And when you want to stop tomcat using the systemd tomcat.service then you… Continue Reading →

Start/Stop windows services from shell script on linux server

Context: you have a shell script running on a linux server and you want this shell script be able to stop or start services on a windows server Windows: Create a local administrator Create a local administrator that we call… Continue Reading →

« Older posts

© 2024 Software engineer >> Sysadmin >> Devops >> SRE

Up ↑