Menu

#5456 On EL8, webmin 1.97 default configuration uses rc init commands instead of systemctl to start/stop Samba

1.970
open
nobody
5
2021-04-15
2021-02-28
ChrisKKS
No

On a fresh install of Oracle Linux 8, webmin 1.97 and samba 4.12, the webmin config uses the "service" command instead of systemctl. This causes attempts to restart the samba service to fail with the error:
Failed to restart Samba servers : /etc/rc.d/init.d/smb start failed

OS/package versions:
samba-4.12.3-12.el8.3.x86_64
webmin-1.970-1.noarch
NAME="Oracle Linux Server"
VERSION="8.3"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="8.3"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Oracle Linux Server 8.3"

output from cat /etc/webmin/samba/config
smbgroupedit=/usr/bin/smbgroupedit
list_printers_command=lpc status | grep "[A-z0-9]:" | sed -e 's/://g'
run_from_inetd=0
pdbedit=/usr/bin/pdbedit
samba_status_program=/usr/bin/smbstatus
sort_mode=0
samba_password_program=/usr/bin/smbpasswd
start_cmd=/etc/rc.d/init.d/smb start
dont_convert=-499
name_server=/usr/sbin/nmbd
net=/usr/bin/net
text_lists=0
swat_path=/usr/sbin/swat
samba_server=/usr/sbin/smbd
smb_passwd=/etc/samba/smbpasswd
smb_conf=/etc/samba/smb.conf
stop_cmd=/etc/rc.d/init.d/smb stop
sync_gid=1001
sync_delete_profile=1
sync_add=1
sync_change=1
sync_delete=1
sync_change_profile=1

Discussion

  • Jamie Cameron

    Jamie Cameron - 2021-03-08

    If you check Webmin's idea of the OS and version by running grep os_ /etc/webmin/config , what output do you get?

     
    • ChrisKKS

      ChrisKKS - 2021-03-11

      It looks correct as below:

      $ grep os_ /etc/webmin/config
      os_type=redhat-linux
      os_version=8
      real_os_type=Oracle Linux
      real_os_version=

       
  • ChrisKKS

    ChrisKKS - 2021-03-11

    Just in case I did something accidental in the last install from messing with webmin and samba settings. Here are the config from a fresh OL8.3 ISO install, fresh samba and webmin install ( using webmin repo). Right after dnf install webmin, nothing configured yet.

    /etc/webmin/samba/config
    pdbedit=/usr/bin/pdbedit
    list_printers_command=lpc status | grep "[A-z0-9]:" | sed -e 's/://g'
    smbgroupedit=/usr/bin/smbgroupedit
    samba_status_program=/usr/bin/smbstatus
    samba_password_program=/usr/bin/smbpasswd
    smb_passwd=/etc/samba/smbpasswd
    name_server=/usr/sbin/nmbd
    stop_cmd=/etc/rc.d/init.d/smb stop
    sort_mode=0
    swat_path=/usr/sbin/swat
    net=/usr/bin/net
    text_lists=0
    run_from_inetd=0
    smb_conf=/etc/samba/smb.conf
    samba_server=/usr/sbin/smbd
    dont_convert=-499
    start_cmd=/etc/rc.d/init.d/smb start

    grep os_ /etc/webmin/config
    os_type=redhat-linux
    os_version=8
    real_os_type=Oracle Linux
    real_os_version=

    rpm -qa webmin samba
    samba-4.12.3-14.el8_3.x86_64
    webmin-1.973-1.noarch

     
  • Jamie Cameron

    Jamie Cameron - 2021-03-12

    Ok, looks like the real issue is that we're detecting the Oracle Linux version incorrectly. What does the /etc/oracle-release file contain on your system?

    As a work-around, you can just adjust the commands in /etc/webmin/samba/config

     
  • Ilia

    Ilia - 2021-04-05

    Chris, what is the output of the following commands:

    cat /etc/oracle-release 
    car /etc/os-release
    
     
    • ChrisKKS

      ChrisKKS - 2021-04-13
      [vm-shared2021 ~]$ cat /etc/os-release
      NAME="Oracle Linux Server"
      VERSION="8.3"
      ID="ol"
      ID_LIKE="fedora"
      VARIANT="Server"
      VARIANT_ID="server"
      VERSION_ID="8.3"
      PLATFORM_ID="platform:el8"
      PRETTY_NAME="Oracle Linux Server 8.3"
      ANSI_COLOR="0;31"
      CPE_NAME="cpe:/o:oracle:linux:8:3:server"
      HOME_URL="https://linux.oracle.com/"
      BUG_REPORT_URL="https://bugzilla.oracle.com/"
      
      ORACLE_BUGZILLA_PRODUCT="Oracle Linux 8"
      ORACLE_BUGZILLA_PRODUCT_VERSION=8.3
      ORACLE_SUPPORT_PRODUCT="Oracle Linux"
      ORACLE_SUPPORT_PRODUCT_VERSION=8.3
      
      [vm-shared2021 ~]$ cat /etc/oracle-release
      Oracle Linux Server release 8.3
      
       
  • Jamie Cameron

    Jamie Cameron - 2021-04-15

    There was a bug in Webmin's OS detection that effected Oracle Linux. This will be fixed in future releases ..

     

Log in to post a comment.