Upgrading Fedora (35 to 36) has never been so easy

2022/10/29

elevate yourself

sudo -i

make you have the lastest kernel, updates then reboot

dnf --refresh upgrade
...
reboot

Install/Update dnf-plugin-system-upgrade package

dnf install dnf-plugin-system-upgrade --best

download new package

dnf system-upgrade download --refresh --releasever=36

reboot to start upgrade process (~30mins)

dnf system-upgrade reboot

do distro sync

dnf distro-sync --setopt=deltarpm=0

remove cached metadata and transaction use

dnf system-upgrade clean

You can remove cached packages

dnf clean packages

That’s it…


Fedora 35 is out !

2021/11/19

The latest version of Fedora has been release in the beginning of the month.

More details on this release are avalaible on Fedora magazine.

You can found an upgrade process from 34 on this page.


FreeTDS “Error 20002 (severity 9): Adaptive Server connection failed” on Fedora 33+

2021/11/18

I did installed freeTDS several time on couple centos 7 OS without any particular issues. The infamous Error 20002 came out sometime if the server instance, port or TDS Version was not set properly on freetds.conf file.

I recently upgrade my workstation from Fedora 32 to 34. After install FreeTDS i noticed that i get that Error 20002 again while the freetds.conf file were the same as before on Fedora 32.

I have to admit that i spend several hours googl’ing the following error message:

Error 20002 (severity 9): 
       Adaptive Server connection failed

or that on freetds.log

  cfg: system priority /etc/crypto-policies/back-ends/gnutls.config has not changed
tls.c:202:GNUTLS: level 2:
  resolved 'SYSTEM' to 'NORMAL', next ''
tls.c:202:GNUTLS: level 2:
  selected priority string: NORMAL
...
tls.c:564:handshake failed: A packet with illegal or unsupported version was received.
login.c:584:login packet rejected
query.c:3783:tds_disconnect() 
util.c:165:Changed query state

The “tls” with “illegal or unsupported version was received” string gave me huge headache.

The tilt came while, from my workstation, i tried to access to a french gov website using Firefox and get the error “Error code: SSL_ERROR_HANDSHAKE_FAILURE_ALERT”. I was able to access to it from any other browser. Googl’ing again and found some properties on Firefox to set the minimum level for TLS. I then remember my FreeTDS TLS issue and try to search for a OS level solution and finally found out that Fedora had disable TLS 1.0-1.1 since the version 33.

I got finally FreeTDS working by changing the crypto-policies to LEGACY

tls.c:202:GNUTLS: level 2:
20:24:14.715492 15372 (tls.c:202):GNUTLS: level 2:
  cfg: system priority /etc/crypto-policies/back-ends/gnutls.config has not changed
20:24:14.715516 15372 (tls.c:202):GNUTLS: level 2:
  resolved 'SYSTEM' to 'NORMAL:+SIGN-DSA-SHA256:+SIGN-DSA-SHA384:+SIGN-DSA-SHA512:+SIGN-DSA-SHA224:+SIGN-DSA-SHA1:+3DES-CBC:+DHE-DSS', next ''
20:24:14.715527 15372 (tls.c:202):GNUTLS: level 2:
  selected priority string: NORMAL:+SIGN-DSA-SHA256:+SIGN-DSA-SHA384:+SIGN-DSA-SHA512:+SIGN-DSA-SHA224:+SIGN-DSA-SHA1:+3DES-CBC:+DHE-DSS
...
20:24:14.752555 15372 (tls.c:548):handshake succeeded!!
20:24:14.752581 15372 (login.c:994):quietly sending TDS 7+ login packet
20:24:14.752780 15372 (token.c:416):tds_process_login_tokens()
20:24:14.766684 15372 (packet.c:436):Received packet

That one was long and painful to solve.


TLS 1.0-1.1 Disabled since Fedora 33

2021/11/18

You may face issues while browsing website using TLS 1.0 or 1.1 on Firefox(some other browsers like brave, tor, edge dev, chrome works).

Error code: SSL_ERROR_HANDSHAKE_FAILURE_ALERT

More detail on support.mozilla.org

This error may occurred on FEDORA since the version 33 since they disable those protocol by default.

https://fedoraproject.org/wiki/Changes/StrongCryptoSettings2

In order to be able to use such protocol on your browser or other program using TLS, you may change change crypto default setting to legacy.

$ sudo update-crypto-policies --set LEGACY
Setting system policy to LEGACY
Note: System-wide crypto policies are applied on application start-up.
It is recommended to restart the system for the change of policies
to fully take place.

It is recommended to reboot your computer, so the change are applied.


Rocky Linux 8.5 is out!

2021/11/18

What a great new ! Long live Rocky

https://rockylinux.org/news/rocky-linux-8-5-ga-release/


NPCD ERROR: Executed command exits with return code ‘255’

2021/08/05

On CentOS 8 if you have installed pnp4nagios, you may have similar error on your logs

sudo journalctl -xe --no-page
NPCD[1469630]: ERROR: Executed command exits with return code '255'
NPCD[1469630]: ERROR: Command line was '/usr/local/pnp4nagios/libexec/process_perfdata.pl -n --bulk /usr/local/pnp4nagios/var/spool/service-perfdata.1628127875'

It’s due(Tomas Balazsik) to the new library Time:HiRes 1.9758 on CentOS 8 that process_perfdata.pl script did not implement yet.

To fix it, just run the following command

sudo sed -s 's/tv_interval $t0, $t1/tv_interval $t0/g' -i /usr/local/pnp4nagios/libexec/process_perfdata.pl

then restart NPCD deamon

sudo systemctl restart npcd

Should be fine after.


Rocky Linux is out !

2021/07/09

Rocky Linux is out and it’s a good news for those who are using CentOS as production server.

Since CentOS announced its end of support for CentOS 8 and at the same time Launch CentOS Stream, the most question all of us asked our-self was: and then ?

Basically, before this announcement the stream were:

Fedora > Red Hat > CentOS

Now its become:

Fedora > CentOS Stream > Red Hat

Well, without go deep in detail what about CentOS stability now ?

If you worry on this particular point, have a look to Rocky Linux , a new Linux distribution project launch by CentOS founder Gregory Kurtzer himself.

I just finish to installed an Apache Guacamole server on it, it went like a charm. I didn’t face any issues, and it’s as much easy than CentOS.

Give is a try, contribute and/or donate !!


How to list current network connection

2013/11/19

It’s often needed while installing a server to check the current network connection. Their is a tools in both Windows and Linux OS but the option are quite different.

Here after a sample that list current TCP listening (server side) connection with it’s associated process ID for Linux and Windows OS.

Linux:

[lolo@dellxps ~]$ netstat -lp --tcp

Windows:

C:\>netstat -abf -p tcp

To test if a particular port is open (here LDAP 389)

Linux:

[lolo@dellxps ~]$ netstat -ltnp | grep :389

Windows:

C:\>netstat -aon | findstr 389

Feel free to use “netstat /?” on windows or the man pages on Linux for more option details.


How to schedule a job/task using crontab

2013/04/16

It’s been a long time since my last post. I’ve been quite busy, but i still want to run these pages so here am i.

First thing first, you don’t want to run a job as root (vi /etc/crontab , unless you do exactly what you are doing of course). So all the following instruction are done under my user.

Let’s see what’s on the definition file  “/etc/crontab”

[lolo@dellxps ~]$ cat /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root

# For details see man 4 crontabs

# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |
# *  *  *  *  * user-name  command to be executed

See, it already tell you everything you need to know. Let’s take a look to an example. i have created a script(~/scripts/notif.sh) that will display a notification on my Gnome desktop on Fedora:

#!/bin/bash
#test bash to be launch with crontab or/and anacrontab
#don't forget chmod u+x notif.sh
notify-send "Hello World" -t 3000

Let now schedule a “funny” reminder every minute ! to edit cron table use the following syntax (to edit another user crontab use -u switch):

[lolo@dellxps ~]$ crontab -e

then add the following line

*/1 * * * * /home/lolo/bin/notif.sh

Now let set it every working day at 13h05 (1:05 pm) from January to June each year:

5 13 * 1,2,3,4,5,6 mon-fri /home/lolo/bin/notif.sh

For each value of the time table minute, hour, day of month, month, day of week you can use special character:

  • use * (star) to specify all possible values of the range. ex: use * for day of month position to schedule the task each day of the month.
  • use , (comma) to specify a list of value. ex: to schedule a job every 2 months, at month position set jan,mar,may,jul,sep,nov or 1,3,5,7,9
  • use – (dash) to specify a range of value. ex: to schedule a task from monday to friday set day of week value as 1-5 or mon-fri
  • use / [slash] to specify a recurrence within the unit of time. ex: use * */1 * * * to schedule an event every hour from 00:00 to 24:00

To review the list of tasks scheduled for your current user:

[lolo@dellxps ~]$ crontab -l

To remove/delete all entries:

[lolo@dellxps ~]$ crontab -r

You may also need to use the shortcuts or aliases instead of this long and coding stuff…for instance:

  • @reboot: Run after each time the machine is started.
  • @yearly or @annually: Scheduled once a year, same as “0 0 1 1 *”.
  • @monthly: Run once a month, same as “0 0 1 * *”.
  • @weekly: Scheduled once a week, same as “0 0 * * 0”.
  • @daily or @midnight: Scheduled once a day, same as “0 0 * * *”.
  • @hourly: Scheduled every hour, same as “0 * * * *”.

 

You can check the cron tab log using the command:

[lolo@dellxps ~]$ tail /var/log/cron

!!! WARNING !!! crontab is used to launch task on a machine that run 24/7. If the the machine is shutdown at the time you specify the task to be executed, NOTHING WILL BE LAUNCH.

If you want to run  a task on a laptop, or desktop that is regulary shutdown use anacrontab instead. It’s similar to crontab but will run the task at {starting time daemon anacron + delay}

[lolo@dellxps ~]$ cat /etc/anacrontab
# /etc/anacrontab: configuration file for anacron

# See anacron(8) and anacrontab(5) for details.

SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
# the maximal random delay added to the base delay of the jobs
RANDOM_DELAY=45
# the jobs will be started during the following hours only
START_HOURS_RANGE=3-22

#period in days   delay in minutes   job-identifier   command
1    5    cron.daily        nice run-parts /etc/cron.daily
7    25    cron.weekly        nice run-parts /etc/cron.weekly
@monthly 45    cron.monthly        nice run-parts /etc/cron.monthly

As usual for more detail don’t forget man pages for more help

  • man crontab
  • man anacrontab

Stay tune…


Fedora 18 is out

2013/01/17

Fedora 18 is out !

Fedora 18 is out !

Check out it’s new features.

Give it a try and download your favorite distribution.