Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-6787

The nc alias in rhel9.3 points to netcat

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Undefined Undefined
    • None
    • rhel-9.3.0
    • nmap
    • None
    • Moderate
    • rhel-stacks-services-scripting
    • ssg_core_services
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None
    • 57,005

      Description of problem:
      If netcat and nmap-ncat are installed at the same time, the nc alias points to netcat in rhel9.3

      Version-Release number of selected component (if applicable):
      rhel9.3 distro: RHEL-9.3.0-20230517.0
      rhel9.2 distro: RHEL-9.2.0-20230517.49

      How reproducible: 100%

      Steps to Reproduce:
      1. configure epel repo

      1. cat /etc/yum.repos.d/epel.repo
        [epel]
        name=Extra Packages for Enterprise Linux $releasever - $basearch
      2. It is much more secure to use the metalink, but if you wish to use a local mirror
      3. place its address here.
        #baseurl=https://download.example/pub/epel/$releasever/Everything/$basearch/
        metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-$releasever&arch=$basearch&infra=$infra&content=$contentdir
        enabled=1
        gpgcheck=1
        countme=1
        gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever

      2. install nc

      1. yum install nc
        Updating Subscription Management repositories.
        Unable to read consumer identity

      This system is not registered with an entitlement server. You can use subscription-manager to register.

      Last metadata expiration check: 1:46:50 ago on Fri 19 May 2023 03:43:20 AM EDT.
      Package netcat-1.219-2.el9.x86_64 is already installed.
      Package nmap-ncat-3:7.92-1.el9.x86_64 is already installed.
      Dependencies resolved.
      Nothing to do.
      Complete!

      3. check the alias name

      Actual results:
      rhel9.2

      1. alternatives --list
        libnssckbi.so.x86_64 auto /usr/lib64/pkcs11/p11-kit-trust.so
        soelim auto /usr/bin/soelim.groff
        iptables auto /usr/sbin/iptables-nft
        ebtables auto /usr/sbin/ebtables-nft
        arptables auto /usr/sbin/arptables-nft
        cifs-idmap-plugin auto /usr/lib64/cifs-utils/cifs_idmap_sss.so
        man auto /usr/bin/man.man-db
        ld auto /usr/bin/ld.bfd
        nc auto /usr/bin/ncat
        cdrecord auto /usr/bin/xorrecord
        mkisofs auto /usr/bin/xorrisofs
      2. file /usr/bin/nc
        /usr/bin/nc: symbolic link to /etc/alternatives/nc
      3. file /etc/alternatives/nc
        /etc/alternatives/nc: symbolic link to /usr/bin/ncat

      rhel9.3

      1. alternatives --list
        libnssckbi.so.x86_64 auto /usr/lib64/pkcs11/p11-kit-trust.so
        soelim auto /usr/bin/soelim.groff
        iptables auto /usr/sbin/iptables-nft
        ebtables auto /usr/sbin/ebtables-nft
        arptables auto /usr/sbin/arptables-nft
        cifs-idmap-plugin auto /usr/lib64/cifs-utils/cifs_idmap_sss.so
        man auto /usr/bin/man.man-db
        ld auto /usr/bin/ld.bfd
        nc auto /usr/bin/netcat
        cdrecord auto /usr/bin/xorrecord
        mkisofs auto /usr/bin/xorrisofs
        qtchooser-5 auto /etc/xdg/qtchooser/5-64.conf
        qtchooser-default auto /etc/xdg/qtchooser/5.conf
      1. file /usr/bin/nc
        /usr/bin/nc: symbolic link to /etc/alternatives/nc
      1. file /etc/alternatives/nc
        /etc/alternatives/nc: symbolic link to /usr/bin/netcat

      Expected results:
      nc should point to ncat

      Additional info:

              rhn-support-mosvald Martin Osvald
              mhou@redhat.com HOU MINXI
              Martin Osvald Martin Osvald
              Frantisek Hrdina Frantisek Hrdina
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: