Lateo.net - Flux RSS en pagaille (pour en ajouter : @ moi)

🔒
❌ À propos de FreshRSS
Il y a de nouveaux articles disponibles, cliquez pour rafraîchir la page.
À partir d’avant-hiernixCraft

Linux turn OFF password expiration / aging

Par : Vivek Gite

The /etc/shadow file stores the actual password in encrypted format using a hash (salted) function for the user's account with additional properties related to the user passwords, such as password expiration date or password aging. The /etc/passwd stores usernames and their properties, such as home directory, login shell, and more. The password expiration information for a user is contained in the last six fields. The Linux password expiration for a select user can be disabled by editing the /etc/shadow file. However, I recommend using the chage command for safety reasons. The chage command changes the number of days between password changes and the last password change date. The Linux system uses this information to determine when users must change their passwords.

Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit

The post Linux turn OFF password expiration / aging appeared first on nixCraft.

A Bash Script to Read All Command Line Arguments into an Array: Simplify Argument Handling

Par : Vivek Gite

If you are writing a Bash shell script, you should read command-line arguments into an array for some time. This allows us to process any number of arguments provided when the script is run. This makes the script adaptable to different use cases. Instead of dealing with fixed variables like $1, $2, $3, etc., you can work with any number of arguments more dynamically using bash for loop or bash while loop, depending upon your needs. Arrays make it simple to loop through each argument and perform operations on them, whether basic printing or complex processing. Bash provides a mapfile (readarray command) internal built-in command to read lines from a file into an array variable. Let us see how to use mapfile to read all command line arguments into an array.

Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit

The post A Bash Script to Read All Command Line Arguments into an Array: Simplify Argument Handling appeared first on nixCraft.

How to Pin Versions in Yum or Dnf for RHEL or CentOS Linux

Par : Vivek Gite

CentOS, RHEL (Red Hat Enterprise Linux), Fedora and other clones of RHEL, such as Oracle, Alma, and Rocky, offer support for version pinning. This feature allows developers and system administrators to lock a particular package to a specific version, preventing it from being automatically updated by yum or dnf commands. Sometimes, it is necessary to protect packages from being updated to newer versions to avoid incompatibility issues with your applications. For example, you can lock down PHP version 8.3.6 and avoid using updated PHP version 8.4. Let us see how to lock a package to a specific version, only exclude a package from yum update or dnf update on a CentOS, RHEL, Fedora, and friends.

Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit

The post How to Pin Versions in Yum or Dnf for RHEL or CentOS Linux appeared first on nixCraft.

How to perform find and replace operations within a visual selection in Vim

Par : Vivek Gite

Here's a quick tip for vim users. You can perform find and replace operations within a visual selection in Vim for text or code block. Visual selection for finding and replacing text in Vim allows developers and Linux/Unix users precise and efficient text editing. It's handy when you want to change specific portions of text or code blocks within a larger file without affecting other occurrences. This method required to minimizing manual search and reducing the risk of unintended code or text modifications. Let us see how to find and replace in Vim visual mode selection.

Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit

The post How to perform find and replace operations within a visual selection in Vim appeared first on nixCraft.

❌