Tuesday, September 20, 2022

Two-Factor Authentication (2FA) for Webmin with Google Authenticator

First install Perl Modules :
https://blog.olineit.com/2022/09/install-perl-cpan-module-in-centos-8.html

Then follow the instructions as given through the URL:
https://devtutorial.io/how-to-install-two-factor-authentication-2fa-for-webmin-p2845.html

Install Perl CPAN Module in CentOS 8

dnf install perl-CPAN

dnf install "@Development Tools"

perl -MCPAN -e 'install Authen::OATH'


cpan -i Geo::IP OR 
cpan Geo::IP


cpan 
cpan[1]> install Log::Log4perl

OR

You need gcc.:
yum install gcc

Get CPAN:
yum install CPAN

Configure CPAN ( just run CPAN ):
CPAN

After CPAN is configured:
install Authen::OATH [module in CPAN shell, which takes a long time to complete.]

When Authen::OATH is successfully installed, configure 2FA in WebMin.

Permission denied (publickey) fix


$ ls -laZ

$ restorecon -r -vv /home/user/.ssh

Monday, September 19, 2022

Friday, September 16, 2022

Installing PHP 7.4 on macOS Sierra without brew?

 sudo port install php74

sudo port install php74-cgi php74-gd php74-curl php74-intl php74-iconv php74-gettext php74-mbstring php74-imap php74-mcrypt php74-xmlrpc php74-mysql php74-openssl php74-sockets php74-zip php74-tidy php74-opcache php74-xsl php74-sqlite
sudo port select php php74

Thursday, September 15, 2022

How to remove directory in Linux

 To permanently remove a directory in Linux, use either rmdir or rm command:

  • For empty directories, use rmdir [dirname] or rm -d [dirname]
  • For non-empty directories, use rm -r [dirname]

Before you remove a directory, you need to know the name of it. To discover files and directories, use the ls command, and to know the current directory you are in, use the pwd command.

The options you use together with these commands are also important to determine how they work. Here’s a quick recap of rm command options:

Command and OptionDescription
rm -dRemove an empty directory using the rm command.
rm -rRemove a non-empty directory and its content.
rm -fIgnore any prompt when deleting a write-protected file.
rm -rfIgnore any prompt when deleting a write-protected non-empty folder.
rm -iOutput a prompt before deleting every file.
rm -IOutput a prompt only once before deleting more than three files.
rm *Wildcard that represents multiple characters.
rm ?Wildcard that represents a single character.
rmdir -pRemove an empty subdirectory and its parent directory.
rmdir -vPrint the information that the specified directory was deleted.

/usr/bin/env: 'php': No such file or directory CentOS Stream

sudo ln -s /usr/bin/php* /usr/bin/php

*= your current php version

Office 2021 Activation using command

  @echo off title Activate Microsoft Office 2021 (ALL versions) for FREE - office.com&cls&echo =====================================...