Note book to help you and me remember some tricks

Author nicodevlog

Samba vs SMB vs CIFS vs NFS

CIFS, SMB and NFS are protocols. And Samba is an implementation of SMB protocol on Linux OS. SMB (Server Message Block) SMB is a network protocol created by IBM for the share of resources (files and printers) in local networks…. Continue Reading →

Linux utmp, wtmp, btmp

/var/run/utmp => shows who is currently connected to the system. Not all the programs use utmp, thus you can have more users connected than displayed in utmp. /var/log/wtmp => is an historical record of utmp data /var/log/btmp => record of… Continue Reading →

mount : System Error: No route to host

(french version of this error message: mount: /mnt/refresh : échec de l’appel système mount(2) : Aucun chemin d’accès pour atteindre l’hôte cible.) You need to install cifs-utils cifs-utils brings utilities for the management of mounting points to CIFS servers (SMB… Continue Reading →

CentOS-8 – AppStream Error: Failed to download metadata for repo ‘AppStream’: Cannot prepare internal mirrorlist: No URLs in mirrorlist

Solution to CentOS 8 AppStream Error As explained here, Centos mirrors have been migrated to vault.centos.org. Then the solution is: After this you can again use the yum command but you won’t received recent updates because Centos mirrors are not… Continue Reading →

How manage background tasks in your CLI and in your shell script application

First: do you know how to run background task not attached to your user session? Running a task attached to your current user session Imagine you establish an ssh connection to your linux host, or you just log into your… Continue Reading →

Shell script function particularities: declare local variables, run in background, …

Run a function in background and get its process ID Instead of creating another script that you call from your primary script you can simply declare a function (inside your primary script or inside another file that you include), and… Continue Reading →

Shell script special variables ordered by frequency of used

$n Where n is a positive integer and takes values from 1 to a greater value not restricted. n correspond to the position of an argument givent to a script or to a function $? Exit status of the last… Continue Reading →

Ansible inventory, best practices to manage ssh key with a bastion (jump host)

Ansible ssh key connection Refer to https://nicodevlog.com/2022/05/21/public-key-authentication-on-linux-best-practices-a-more-secure-way-to-connect-to-your-hosts-without-login-and-password/ The advantages of an ssh key over a basic authentication are: no raw password (but you can encrypt passwords using ansible vault) one unique private key to connect to several nodes (but of… Continue Reading →

Public key authentication on Linux – best practices: a more secure way to connect to your hosts without login and password

Note: for the whole article, I will work with a linux user called ansible on a host called also…ansible! 🙂 ssh-keygen When you use ssh-keygen you will generate a private and public key pair. And you’ll have to choose which… Continue Reading →

Install ansible 5 inside a python virtual environment with python 3.10.4

Note: The following commands are for RockyLinux, RedHat, CentOS, on other distros it will be almost the same. I’ve made the choice to connect to a user called ansible, and inside his home directory I’ve created a directory called ansible,… Continue Reading →

« Older posts Newer posts »

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

Up ↑