Pages

Showing posts with label My Works on OpenSource Platform. Show all posts
Showing posts with label My Works on OpenSource Platform. Show all posts

nmcli device status UNMANAGED on Ubuntu 20.04 Jammy

Changing NIC from Unmanaged to Managed State in Ubuntu

Before creating a teaming NIC on Ubuntu, ensure that the ethernet interfaces are in a managed state. This guide walks you through how to change the state from unmanaged to managed.


Step 1 — Check Netplan Configuration

ls /etc/netplan/
# if config file is 00-network-manager-all.yaml
cat /etc/netplan/00-network-manager-all.yaml

Step 2 — Display Network Device Status

nmcli device
Note: Identify devices that show STATE = unmanaged and note their DEVICE and TYPE.

Step 3 — Check for Unmanaged Devices

sudo grep -ri unmanaged-devices /etc/NetworkManager/conf.d/
sudo grep -ri unmanaged-devices /etc/NetworkManager/
Make sure your device is not listed under unmanaged-devices.

Step 4 — Edit Global NetworkManager Configuration

sudo vim /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf

Add ethernet to the managed list by modifying the file like this:

[keyfile]
unmanaged-devices=*,except:type:ethernet

Then reload the NetworkManager service:

sudo systemctl reload NetworkManager.service

Step 5 — Verify the Device State

nmcli device
nmcli connection show

Step 6 — Restart Networking

nmcli networking off
nmcli networking on

Step 7 — Test Connectivity

nmcli connection up eno1

✅ Tip: Once your NIC shows as managed, you can proceed to configure NIC teaming using netplan or nmcli.

Source: nixcraft.com

How to Check CPU Information in Ubuntu (Simplified)

Hey there, Linux explorer! 🐧 Whether you’re tuning up your system or just curious about what’s under the hood, knowing your CPU details helps you understand performance and compatibility. Let’s make it fun and fast!


⚙️ Step 1: Quick CPU Summary

Command:

lscpu

💡 Output: Shows CPU model, architecture, cores, threads, and speed — all in a neat format.

Try it: Copy-paste the command above into your terminal and see what you’ve got!

🔍 Step 2: Dive Deeper (Per-Core Info)

Command:

cat /proc/cpuinfo

📊 Output: Displays detailed information for each CPU core. Perfect if you love seeing the nitty-gritty.

Pro Tip: Use grep to filter what you need — for example:

cat /proc/cpuinfo | grep 'model name'

🧩 Step 3: Count CPU Cores

Command:

nproc

💬 It’ll tell you exactly how many cores your Ubuntu system sees — fast and clean!

📈 Step 4: Watch CPU in Real Time

Command:

top

Or for a cooler, colorized version:

htop

🧰 If you don’t have htop installed yet, run:

sudo apt install htop

Result: You’ll see live CPU, memory, and process stats dancing in real time!

🔧 Step 5: Hardware-Level Details

Command:

sudo lshw -class processor

📘 Tip: If Ubuntu says command not found, install it first:

sudo apt install lshw

📋 Quick Reference Table

CommandPurpose
lscpuShow CPU summary (model, cores, speed)
cat /proc/cpuinfoDetailed per-core information
nprocCount number of CPU cores
top / htopMonitor live CPU usage
sudo lshw -class processorHardware-level CPU details

💬 Bonus: Make It Fun!

  • 🎯 Challenge yourself: Find your CPU speed and number of threads in under 30 seconds!
  • 🧩 Use watch -n 1 lscpu to refresh CPU stats every second.
  • ⚡ Compare lscpu outputs before and after system load — notice the clock speed change?

Snipe-IT : Time not accurate (Wrong Time / Worng Date)

Oops, suddenly I realized that the data that was being saved (Snipe-IT) did not match the current time of the activity taken.

I am really sure that the problem came from Snipe-IT because of no issues from:

  • The time and date on the server are accurate.
  • There are several applications running that are very dependent on accuracy in time.

The problem came from the "REQUIRED: BASIC APP SETTINGS" on the .env file.

Just change APP_TIMEZONE from 

APP_TIMEZONE='UTC' to APP_TIMEZONE='Asia/Kuala_Lumpur' <depends on your timezone> based on the PHP-supported timezone.

After changing the timezone, just restart the Apache. It should be ok.


Error 1 : Snipe-IT (your documentroot is set incorrectly)

D'oh. if you're seeing this, your DocumentRoot is set incorrectly. It should be set to the public directory.

  1. Open Apache httpd.conf (On default installation, it should be in C:\xampp\apache\conf\httpd.conf)
  2. Find DocumentRoot and changed as follows;

    DocumentRoot "C:/xampp/htdocs"
    <Directory "C:/xampp/htdocs">

    Changed to 

    DocumentRoot "C:/xampp/htdocs/snipe-it/public"
    <Directory "C:/xampp/htdocs/snipe-it/public">

  3. Stop and Start Apache
Take note that, this configuration is only for running 1 application or system on 1 server.


Error 2 : Snipe-IT (Error Backup failed...)

 

When I tried to create a backup from admin panel, Error Backup failed because The dump process failed with exitcode 1 : General error : The system cannot find the path specified.

This is most probably a misconfiguration in .env file.


Default configuration in .env file

DB_DUMP_PATH='/usr/bin'

Changed to 

DB_DUMP_PATH='C:\xampp\mysql\bin'


The backup folder will be on C:\xampp\htdocs\snipe-it\storage\app\backups

DB_DUMP_PATH is based on your XAMPP installation folder.

These new configurations allow the execution of backup.

XAMPP 8.1.6 + Snipe-IT-6.0.10

These are the brief step on configuring Snipe-IT ver. 6.1.10 with XAMPP 8.16
  1. Install XAMPP as usual.
  2. Download Snipe-IT, extract and put into folder C:\xampp\htdocs\snipe-it (location of your XAMPP installation and for this example I'm also using snipe-it as folder name).

 

Composer Configuration 

  1. Download the latest composer and install it.
    During the installation process, choose C:\xampp\php\php.exe (location of the command-line PHP you want to use).
  2. Open Command Prompt (without "Run as Administrator").
  3. Changed to the folder location of Snipe-IT that you extracted previously (in Command Prompt).
  4. Execute the command: composer install
    • If error during the execution of this command (usually on enabling the extension in php.ini), just enabled the extension required. 

    • Personally, I'll execute the command composer update before continuing process no 4.


Snipe-IT Configuration

  1. Open the folder of Snipe-IT that you extracted previously (in Windows Explorer).
  2. Copy file name .env.example and rename as .env
  3. Generate your App key by;
    • Open the folder of Snipe-IT (in Command Prompt).
    • Execute command php artisan key:generate 
  4. Browse PHPMyAdmin and create a database for snipe-it (for this manual, database named snipe-it)
  5. Edit .env and changed;
    • APP_URL=localhost
    • DB_DATABASE=snipe-it
    • DB_USERNAME=root

 

Hopefully, this can help you during the deployment of Snipe-IT.

Changed Default Page For Nagios Version 4.4.x

Search for a file named index.php. The file located in your nagios installation folder /..../nagios/share/index.php

and then search for $url = 'main.php';
This is the default page for Nagios. Change only main.php to your desired default page, either Type 1 or Type 2. It's your call.


Type 1;
$url='map.php?host=all';


Type 2;
$url='cgi-bin/tac.cgi';



Actually, it's just changing the URL for the default page.
After editing the file, don't forget to restart your Apache.

Linux : Showing Processor Type, Memory Size, Total Disk Space

Anyway, to cut a long story short, I got documentation that needs to be submitted which is to get the info of the processor type, memory info and storage size for Linux machines. 

A bunch of information will be displayed if we only used lscpu, meminfo and df command. To make life easier, below are the straightforward command to get that information.

Checking for processor type.

(1) lscpu | grep "Model name"


Checking memory info using grep command.
(Global Regular Expression Print)

(2) grep MemTotal /proc/meminfo | numfmt --field 2 --from-unit=Ki --to-unit=Mi | sed 's/ kB/M/g'

(3) grep MemTotal /proc/meminfo | numfmt --field 2 --from-unit=Ki --to=iec | sed 's/ kB//g'

(4) grep MemTotal /proc/meminfo | numfmt --field 2 --from-unit=Ki --to-unit=Gi | sed 's/ kB/G/g'


Checking memory info using awk command.
(Aho, Weinberger, Kernighan (authors))


(5) awk '$3=="kB"{$2=$2/1024;$3="MB"} 1' /proc/meminfo | column -t | grep MemTotal

(6) awk '$3=="kB"{$2=$2/1024^2;$3="GB";} 1' /proc/meminfo | column -t | grep MemTotal


Checking Store Size

(7) df --total -h




If there is any detailed explanation, just let me know in the comment below. Thanks.


Gems can't create makefile? Ubuntu 12.04.2

I'm getting the following result when I try to install the passenger & mysql gems.

I've followed the Ubuntu Hardy articles to setup my slice, apache & ruby/rails.

= = = = = = = = = = = = =

sudo gem install mysql
Bulk updating Gem source index for: http://gems.rubyforge.org/
.............
complete
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb install mysql
checking for mysql_query() in -lmysqlclient... yes
checking for mysql_ssl_set()... yes
checking for mysql.h... no
checking for mysql/mysql.h... yes
creating Makefile

make
sh: make: not found

Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out

= = = = = = = = = = = = =

Ok so this problem was happening with several gems. After some hunting I realised make wasn't installed.

I assume I missed a line out somewhere, the following command solved it;
sudo apt-get install build-essential

Thanks to anima from http://forum.slicehost.com

eth0 missing in Ubuntu LTS

After fresh installation Ubuntu LTS, the machine suppose to grab IP Address from DHCP (in my situation).
Unfortunately the machine only show lo (loopback) interface.

When we check ifconfig -a | grep eth, it shows eth0 which means that the interface is exist.

The problem is the machine could not determine eth0 either static or Dynamic IP Address.

In my case, I wanted the machine to grab the IP Address from DHCP, in that case;

I just key-in sudo dhclient eth0 

Then, try ping to www.google.com (for example). Good Luck


Free Open Source School, College, University Management System

Yet another open source product specialized for School, College and University Mangement Information System. Its Project Fedena, the community team did excellent job and developed the whole system into RoR (Ruby on Rails) framework.


  • User Management
  • Student Management
  • News Management
  • Miscellaneous Settings
  • Time Table Management
  • Examination Management
  • Attendance Management
  • Future Updates and Ehancements

Reference : Project Fedena

Open Source Wi-Fi Hotspot Solutions (DD-WRT)


These are my new RnD on using Open Source solution for Wi-Fi Hotspot. Whether you're wanting to give away or charge your visitors for the wireless Internet without have to spends hundreds on a off-the-shelf hotspot gateway. DD-WRT Features;
  • DD-WRT is a firmware replacement you upload onto a supported wireless router. This changes your router's control panel and gives you many more features, including several hotspot solutions.
  • Chillispot : Gives you great hotspot authentication and management features for free or commercial hotspot locations, but requires an external RADIUS server. However, you can use hosted servers from companies such as Worldspot.net, HotSpotSystem.com, and WirelessOrbit.
  • NoCatSplash : Provides a quick and simple captive portal, but doesn't include user login or management features. This is still great for single hotspot locations where you want users to agree to Terms of Service (ToS) before getting access.
  • WiFiDog : Gives you an advanced captive portal and content management for free hotspot locations. However, you must configure a proprietary external server.
  • Sputnik : Provides free and commercial hosted services that gives you user authentication and device management for use with free or pay access hotspot solutions.

Reference : LinuxPlanet

Import PST to Zimbra

Like I promise before, let me brief you abut my situation,

By using the script imapsync recommended by Zimbra, certain email account are not successfully sync.

Then I think to decide download the email to .pst file and then load it back to Zimbra.

Thanks to Zimbra, they came out with solution  "Microsoft Outlook PST Import Tool"


Brief about the application :

The Zimbra™ Collaboration Suite (ZCS) Import Wizard for Outlook lets users import the contents of a .pst file from a Microsoft® Outlook® 2003 or Outlook 2007 mailbox to accounts on the Zimbra server.

Note: The ZCS Import Wizard can import .pst files from Outlook 2000 and Outlook XP, provided that the ZCS Import Wizard is run on a machine with either Outlook 2003 or Outlook 2007 installed.
The Import Wizard imports email messages, attachments, contacts, calendars, tasks, and personal distribution lists. When the files are imported, the Outlook folder hierarchy is maintained. If categories have been assigned to messages and contacts, these are converted to tags in the user’s Zimbra mailbox.

Further explanation : Import Wizard for Outlook


Zimbra Unable to determine enabled services from LDAP

[zimbra@host]$ zmcontrol start
Host mail.plugged.in
Starting ldap…Done.
Unable to determine enabled services from ldap.
Enabled services read from cache. Service list may be inaccurate.
Starting logger…Failed.
Starting logswatch…ERROR: service.FAILURE (system failure: ZimbraLdapContext) (cause: javax.net.ssl.SSLHandshakeException sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target)
zimbra logger service is not enabled! failed.

The usual reason for this error is expired an SSL certificate.

This error usually happens if your SSL certificate has expired. There are two solutions for this problem.

The first solution is renewing your certificate and deploying it with the following command :

[zimbra@host]$ /opt/zimbra/bin/zmcertmgr deploycrt comm /opt/zimbra/ssl/zimbra/commercial/your_new_ssl.crt /path/to/ca_bundle.crt


Migration Zimbra from Axigen

Sample script for Migration

host1=58.27.56.213
#host1 is source (Axigen)

host2=192.168.1.100
#host2 is destination (Zimbra)

AXIGENusername=yaakub@noblefeature.net
#AXIGEN  username

AXIGENpassword=abc123
#AXIGEN password

ZIMBRAusername=yaakub
#ZIMBRA username

ZIMBRApassword=abc123
#ZIMBRA password

imapsync --noauthmd5 --buffersize 8192000 --nosyncacls --subscribe \
--syncinternaldates --host1 $host1 --user1 "$AXIGENusername" --password1 \
"$AXIGENpassword" --sep1 "/" --prefix1 "" --host2 $host2 --user2 \
"$ZIMBRAusername" --password2 "$ZIMBRApassword"
echo " "
echo "IMAPSync for "$AXIGENusername" Completed!"
echo " "

Default Ports Used by Zimbra

You may choose not to allow remote connections to all of these. In a multi-node environment, all nodes will need access to the ldap server or servers (389) and to the logger server (514), mta nodes will need access to lmtp on all mailbox nodes (7025), mailbox nodes will need admin port access to other mailbox nodes (7071).

External Access

These are ports typically available to mail clients.
25      : smtp [mta] - incoming mail to postfix
80      : http [mailbox] - web mail client
110    : pop3 [mailbox]
143    : imap [mailbox]
443    : https [mailbox] - web mail client over ssl
465    : smtps [mta] - incoming mail to postfix over ssl (Outlook only)
587    : smtp [mta] - Mail submission over tls
993    : imaps [mailbox] - imap over ssl
995    : pops [mailbox] - pop over ssl
7071  : https [mailbox] - admin console

Configure DNS Name Server IP Address in Linux

You need to edit /etc/resolv.conf file under Linux to set Name server IP address that the resolver should query. Up to 3 name server internet IP address can be defined. If there are multiple servers, the resolver library queries them in the order listed.

Ubuntu Linux Configure DNS Name resolution

Type the following command, enter:
$ sudo vi /etc/resolv.conf

Or use nano text editor:
$ sudo nano /etc/resolv.conf

Append your ISP name server IP address as follow:
nameserver

Save and close the file. Test your dns configuration by typing the following commands:
$ host yahoo.com
$ nslookup google.com
$ ping my-it-life.blogspot.com

Check open port for program in Linux (Video)

Really need to share with you guys,

So how do you list the network open ports on your Linux server and the process that owns them? The answer is simple. Use the following command (must be run as the root user):

sudo lsof -i
sudo netstat -lptu
sudo netstat -tulpn


Sample outputs (see video demo):


Credit to: www.cyberciti.biz

Installing PHP on Solaris systems Tips


Required software
Solaris installs often lack C compilers and their related tools. Read this FAQ for information on why using GNU versions for some of these tools is necessary.

For unpacking the PHP distribution you need
  • tar
  • gzip or
  • bzip2

For compiling PHP you need
  • gcc (recommended, other C compilers may work)
  • make
  • GNU sed

For building extra extensions or hacking the code of PHP you might also need
  • flex (up to PHP 5.2)
  • re2c
  • bison
  • m4
  • autoconf
  • automake

Configuring Telnet / FTP to login as root (Solaris 10)


Bare in mind that this is VERY² BAD security practice.
Make sure your production server not configure this way.

Configure Telnet for root logins

Edit file /etc/default/login and comment out;
    # CONSOLE=/dev/console

Configure FTP for root logins

Edit file /etc/ftpd/ftpusers and comment out;
    # root

You might also like:

Popular Posts

Labels

Basic Security (4) Blog Tips (2) EVE-NG (1) Hardware (7) HOT Law IT News (2) Microsoft Office Tips (3) Microsoft Windows Tips (33) My Works on OpenSource Platform (33) OSCC Product (4) Umum (11) Virus Solutions (2) XAMPP & Snipe-IT (5)