-->

DEVOPSZONES

  • Recent blogs

    How to Fix ‘semanage: command not found’ Error in CentOS/RHEL/OEL

     I was configuring ssh port and has to channge the security context values using semanage command , but i was welcomed by a semanage command not found error.

    [root@ftp1 ~]# semanage port -a -t ssh_port_t -p tcp 5600

    -bash: semanage: command not found

    [root@ftp1 ~]#


    semanage command not found

    semanage is an SELinux (Security-Enhanced Linux) management tool that is used to configure specific elements without making any adjustments to or reassembling from policy sources. 

    In this article, I will explain how to install necessary packages for getting semanage command using the yum command.


    [root@ftp1 ~]# yum provides /usr/sbin/semanage

    Last metadata expiration check: 3:53:01 ago on Thu 23 Sep 2021 10:45:15 AM GMT.

    policycoreutils-python-utils-2.8-16.1.0.1.el8.noarch : SELinux policy core python utilities

    Repo        : ol8_baseos_latest

    Matched from:

    Filename    : /usr/sbin/semanage


    find Semanage package


    As the above command suggests we need to install policycoreutils-python-utils-2.8-16.1.0.1.el8.noarch. 

    [root@ftp1 ~]# yum install policycoreutils-python-utils

    Last metadata expiration check: 3:53:42 ago on Thu 23 Sep 2021 10:45:15 AM GMT.

    install semanage

    Once the installation is complete, try running the semanage command again, it should work.







    No comments