Configuring Samba on the server hosting the Squid service

To configure the Samba service:

  1. Add Samba to autostart. To do so, perform one of the following actions depending on the operating system you are using:
    • CentOS, Red Hat Enterprise Linux or SUSE Linux Enterprise Server.

      Run the following commands:

      systemctl start smb

      systemctl enable smb

      systemctl start nmb

      systemctl enable nmb

    • Ubuntu or Debian.

      Run the following commands:

      systemctl start smbd

      systemctl enable smbd

      systemctl start nmbd

      systemctl enable nmbd

  2. Add the following parameters to the /etc/samba/smb.conf file:

    [global]

    workgroup = <NetBIOS name of the Active Directory domain>

    password server = <DNS name of the Active Directory domain controller>

    realm = <uppercase Active Directory domain name>

    security = ads

    idmap uid = 10000-20000

    idmap gid = 10000-20000

    winbind use default domain = no

  3. Add the server to the Active Directory domain. To do so, execute the command:

    net ads join -U <domain administrator>

    You will be prompted to enter the password of the domain administrator or the password of a user with domain administrator rights.

  4. Type the administrator password and press ENTER.

    The server will be added to the Active Directory domain.

  5. Verify that the server has been added to the Active Directory domain. To do so, execute the command:

    net ads testjoin

    If the server has been added to the Active Directory domain, Join is OK is displayed in the console.

  6. Start the winbind service. To do so, execute the command:

    systemctl start winbind

  7. Add the winbind service to autostart. To do so, execute the command:

    systemctl enable winbind

  8. If you use Ubuntu or Debian, add the 'proxy' user to the 'winbindd_priv' group. To do so, execute the command:

    usermod -a -G winbindd_priv proxy

Samba configuration will be completed. Proceed to check the Samba settings.

Page top