Tag Archives: Linux Tutorials

Linux Tutorials and Unix Similar multi-user operating systems based on the Linux kernel and essentially on GNU software. Like CentOS, Debian, Ubuntu Fedora.

Install phpMyAdmin on Web Server

Install phpMyAdmin out-of-the-box on Apache web server

Install phpMyAdmin on your web server always with requirements quick and smooth.

Preface

I wrote pmaproving.sh for out-of-the-box installation, primarily because deploying phpmyadmin from the Apt repository proved inconvenient and incomplete mainly when used in development environments (I use Apache2 in WSL). This avoids time-consuming setup with each installation and allows you to deploy the same requests quickly and seamlessly every time.

Install phpMyAdmin on Web server Log in

Install phpMyAdmin on Apache Web Server

This bash script provisioning phpMyAdmin on GNU/Linux, written in GNU bash v5.1.16(1) on Debian 11 and ran also with Ubuntu 22.04.3 LTS. The script will also work on all Ubuntu based distros, provided that bash is used.

Purpose

Installation of phpMyAdmin on your Apache web server always with requirements quick and smooth. Any settings you change in phpMyAdmin are saved, the default setting in the navigation tree is set to Maximum 50 Elements in Branch, of course you can increase and decrease the values. You can change settings in the config.inc.php file, or via the small gear in the webUI, these are then saved in the database.

Usage:

git clone https://github.com/unblog/pmaproving
or download from github GitHub.
Log in to bash as root and run the script.

cd ~
wget -L https://raw.github.com/unblog/pmaproving/main/pmaproving.sh -O pmaproving.sh
chmod u+x pmaproving.sh
./pmaproving.sh

Note. now is a good opportunity to make your changes in the settings section. You can keep all values ​​as they are, but you should change the password for MYPASS, you’ll not need this later; it is only used for database access.

Requirement

No special requirements are expected; apart of course, a ready-to-use Apache web server with PHP and MariaDB, the unzip and wget packages will be provided automatically if not already exist.

Addendum

The use of phpMyAdmin with pmaproving.sh for out-of-the-box deployment was mainly due to the fact that deploying phpMyAdmin from the Apt repository proved to be impractical and incomplete, especially when used in development environments.

Feedback

Please leave a comment for suggestions, additions, deviations or troubleshooting.

XScreenSaver sonar must be setuid to ping

When I invoke the XScreenSaver Sonar or lock the screen, the Sonar XScreenSaver displays “sonar must be setuid to ping”

XScreenSaver sonar must be setuid to ping

Last weekend was a rainy Sunday, so I thought it would be a good time to upgrade the Linux Mint. My Thinkpad is running Linux Mint they I would upgarde from Linux Mint 21 (Vanessa) to Linux Mint 22 (Wilma). For those who are not familiar with the beautiful Linux Mint desktop. Linux Mint is based on the Ubuntu distribution, so Debian is the underlying system. Debian is the exemplary open source operating system what I prefer and mainly use for the servers.

One of the features I like on the Linux desktop is the Sonar XScreenSaver. Sonar shows the active hosts in the local network which are recognized by using ping as a screen saver. When I try to enable the XScreenSaver Sonar in the control center, it appers “sonar must be setuid to ping”.

cause

The Sonar program executed out from XScreenSaver must be installed as setuid root in order to ping hosts. This is because root privileges are needed to create an ICMP RAW socket.

Solution

First we find Sonar, which is not located under the same path on all distributions. You can easily find the location of Sonar with using the locate command.

$ locate sonar | head -n 1
/usr/libexec/xscreensaver/sonar

With head we see the first line with path where sonar is.

Now run the command as follows in the terminal shell to set permission.

$ sudo chmod +s /usr/libexec/xscreensaver/sonar

The s permissions instead of x in the owner permissions means that the sticky bit (suid) is enabled. So this file will be executed with root permissions by all users.

XScreenSaver setuid sonar ping

Note. some distributions Sonar is be under a different path.

$ sudo chmod +s /usr/lib/xscreensaver/sonar

Finaly check whether the permission has been set.

$ ls -ld /usr/libexec/xscreensaver/sonar
-rwsr-sr-x 1 root root 127448 Mar 31 19:32 /usr/libexec/xscreensaver/sonar

Conclusion

On most Unix systems, the Sonar program must be installed as setuid root in order to ping hosts. This is because root privileges are needed to create an ICMP RAW socket. Privileges are disavowed shortly after startup (just after connecting to the X server) so this is believed to be safe:

$ sudo chown root:root sonar
$ sudo chmod u+s sonar

It is not necessary to make it setuid on MacOS systems. Because on MacOS, unprivileged programs can ping by using ICMP DGRAM sockets instead of ICMP RAW.

In ping-mode, the display is a logarithmic scale, calibrated so that the three rings represent ping times of approximately 2.5, 70 and 2,000 milliseconds respectively.

This means that if any the hosts you are pinging take longer than 2 seconds to respond. They won’t show up; and if you are pinging several hosts with very fast response times. They will all appear close to the center of the screen (making their names hard to read.)