All Products
Search
Document Center

File Storage NAS:Mount an SMB file system on Linux as an AD user

Last Updated:Jun 20, 2026

This topic describes how to mount an SMB file system on a Linux client as an AD domain user. It also describes how to access the file system and manage Access Control Lists (ACLs) for its files and directories after it is mounted.

Prerequisites

Background

Before you add the mount target of an SMB file system to an AD domain, you can only mount and use the file system as an anonymous user. After the mount target is added to the AD domain, you can choose whether to continue allowing access from anonymous users.

  • If you continue to allow anonymous access, clients can use Kerberos authentication to access the file system with a domain identity, or use NTLM authentication to access it as a member of the Everyone group.

  • If anonymous access is disallowed, only Linux clients that use the Kerberos authentication protocol can mount the file system as an AD domain user.

The following procedure uses Ubuntu and CentOS as examples to demonstrate how to mount and access an SMB file system as an AD domain user.

Method 1: Mount on a domain-joined client

  1. Log on to the Linux client.

  2. Join the Linux client to the AD domain.

    • Ubuntu

      1. Install the AD configuration packages.

        sudo apt-get update
        sudo apt-get -y install realmd libnss-sss libpam-sss sssd sssd-tools adcli samba-common-bin oddjob oddjob-mkhomedir packagekit krb5-user
      2. Set the hostname for the Linux client in the AD domain.

        sudo hostnamectl set-hostname myubuntu.example-company.com

        In the command, replace example-company.com with your AD domain name.

        After the configuration is complete, run the hostnamectl command to verify the client hostname.

        user1@myubuntu:/home$ sudo hostnamectl set-hostname myubuntu.example-company.com
        user1@myubuntu:/home$ hostnamectl
           Static hostname: myubuntu.example-company.com
                 Icon name: computer-vm
                   Chassis: vm
                Machine ID: 20210623112404781463487467590001
                   Boot ID: 0702ff766c504355a16f9b27e467a6f6
            Virtualization: kvm
          Operating System: Ubuntu 20.04.2 LTS
                    Kernel: Linux 5.4.0-77-generic
              Architecture: x86-64
        user1@myubuntu:/home$
      3. Configure DNS.

        1. Run the following commands to stop automatic DNS updates.

          sudo systemctl disable systemd-resolved
          sudo systemctl stop systemd-resolved
        2. Add the IP address of the AD server to the /etc/resolv.conf file.

          # Generated by NetworkManager
          search example-company.com
          nameserver 172.19.0.61
        3. Run the ping command to ping the AD server name and verify connectivity.

          user1@myubuntu:/home$ ping example-company.com
          PING example-company.com (172.19.0.61) 56(84) bytes of data.
          64 bytes from 172.19.0.61 (172.19.0.61): icmp_seq=1 ttl=128 time=0.274 ms
          64 bytes from 172.19.0.61 (172.19.0.61): icmp_seq=2 ttl=128 time=0.289 ms
          64 bytes from 172.19.0.61 (172.19.0.61): icmp_seq=3 ttl=128 time=0.270 ms
          64 bytes from 172.19.0.61 (172.19.0.61): icmp_seq=4 ttl=128 time=0.273 ms
          ^C
          --- example-company.com ping statistics ---
          4 packets transmitted, 4 received, 0% packet loss, time 3073ms
          rtt min/avg/max/mdev = 0.270/0.276/0.289/0.007 ms
      4. Discover the AD domain.

        realm discover <AD domain>
        user1@myubuntu:/home$ realm discover example-company.com
        example-company.com
          type: kerberos
          realm-name: EXAMPLE-COMPANY.COM
          domain-name: example-company.com
          configured: kerberos-member
          server-software: active-directory
          client-software: sssd
          required-package: sssd-tools
          required-package: sssd
          required-package: libnss-sss
          required-package: libpam-sss
          required-package: adcli
          required-package: samba-common-bin
          login-formats: %U@example-company.com
          login-policy: allow-realm-logins
      5. Join the Linux client to the AD domain.

        sudo kinit Administrator@EXAMPLE-COMPANY.COM
        sudo realm join -U Administrator example-company.com

        Run the realm list command. If the output is similar to the following, the Linux client has joined the AD domain.

        user1@myubuntu:/home$ realm list
        example-company.com
          type: kerberos
          realm-name: EXAMPLE-COMPANY.COM
          domain-name: example-company.com
          configured: kerberos-member
          server-software: active-directory
          client-software: sssd
          required-package: sssd-tools
          required-package: sssd
          required-package: libnss-sss
          required-package: libpam-sss
          required-package: adcli
          required-package: samba-common-bin
          login-formats: %U@example-company.com
          login-policy: allow-realm-logins
      6. Configure automatic home directory creation for AD domain user logon.

        1. Configure the home directory.

          sudo bash -c "cat > /usr/share/pam-configs/mkhomedir" <<EOF
          Name: activate mkhomedir
          Default: yes
          Priority: 900
          Session-Type: Additional
          Session:
                  required                        pam_mkhomedir.so umask=0022 skel=/etc/skel
          EOF
        2. Run the following command to apply the configuration.

          pam-auth-update
        3. After the command runs, use the arrow keys and Spacebar to ensure that the activate mkhomedir option is selected (marked with an asterisk (*)). Then, press the Tab key to navigate to Ok and press Enter.

          Pluggable Authentication Modules (PAM) determine how authentication, authorization, and password changing are handled on the
          system, as well as allowing configuration of additional actions to take when starting user sessions.
          Some PAM module packages provide profiles that can be used to automatically adjust the behavior of all PAM-using applications
          on the system.  Please indicate which of these behaviors you wish to enable.
          PAM profiles to enable:
              [*] Pwquality password strength checking
              [*] activate mkhomedir
              [*] Unix authentication
              [*] SSS authentication
              [*] Register user sessions in the systemd control group hierarchy
              [*] Inheritable Capabilities Management
                              <Ok>                        <Cancel>
      7. Configure the Linux sssd service.

        1. In the /etc/sssd/sssd.conf configuration file, add the line krb5_ccname_template=FILE:%d/krb5cc_%U.

          [sssd]
          domains = example-company.com
          config_file_version = 2
          services = nss, pam
          [domain/example-company.com]
          default_shell = /bin/bash
          krb5_store_password_if_offline = True
          cache_credentials = True
          krb5_realm = EXAMPLE-COMPANY.COM
          realmd_tags = manages-system joined-with-adcli
          id_provider = ad
          fallback_homedir = /home/%u@%d
          ad_domain = example-company.com
          use_fully_qualified_names = True
          ldap_id_mapping = True
          access_provider = ad
          krb5_ccname_template=FILE:%d/krb5cc_%U
        2. Run the following commands to restart the sssd service and check its status.

          sudo systemctl restart sssd
          sudo systemctl status sssd

          Output similar to the following indicates that the sssd service is configured successfully.

          root@iZrj90myfgaf70i4jqsmr9Z:~# systemctl status sssd
          ● sssd.service - System Security Services Daemon
             Loaded: loaded (/lib/systemd/system/sssd.service; enabled; vendor preset: enabled)
             Active: active (running) since Fri 2021-03-12 14:00:21 CST; 3s ago
           Main PID: 21279 (sssd)
              Tasks: 4 (limit: 9315)
             Memory: 42.2M
             CGroup: /system.slice/sssd.service
                     ├─21279 /usr/sbin/sssd -i --logger=files
                     ├─21300 /usr/libexec/sssd/sssd_be --domain example.com --uid 0 --gid 0 --logger=files
                     ├─21301 /usr/libexec/sssd/sssd_nss --uid 0 --gid 0 --logger=files
                     └─21302 /usr/libexec/sssd/sssd_pam --uid 0 --gid 0 --logger=files
    • CentOS

      1. Install the AD configuration packages.

        sudo yum update
        sudo yum install sssd realmd oddjob oddjob-mkhomedir adcli samba-common samba-common-tools krb5-workstation openldap-clients policycoreutils-python-utils -y
      2. Set the hostname for the Linux client in the AD domain.

        sudo hostnamectl set-hostname mycentos.example-company.com

        In the command, replace example-company.com with your AD domain name.

        After the configuration is complete, run the hostnamectl command to verify the client hostname.

        [user1@mycentos root]$ sudo hostnamectl set-hostname mycentos.example-company.com
        [user1@mycentos root]$ hostnamectl
           Static hostname: mycentos.example-company.com
                 Icon name: computer-vm
                   Chassis: vm
                Machine ID: 20210623110808105647395700239158
                   Boot ID: e8fded82c87f4fe783e3c75263c854d9
            Virtualization: kvm
          Operating System: CentOS Linux 8
               CPE OS Name: cpe:/o:centos:centos:8
                    Kernel: Linux 4.18.0-305.12.1.el8_4.x86_64
              Architecture: x86-64
      3. Configure DNS.

        Write the AD server IP address to /etc/resolv.conf and delete the default DNS server. Run the ping command: ping the AD server name to verify connectivity.

        [user1@mycentos root]$ ping example-company.com
        PING example-company.com (172.19.0.61) 56(84) bytes of data.
        64 bytes from 172.19.0.61 (172.19.0.61): icmp_seq=1 ttl=128 time=0.221 ms
        64 bytes from 172.19.0.61 (172.19.0.61): icmp_seq=2 ttl=128 time=0.334 ms
        64 bytes from 172.19.0.61 (172.19.0.61): icmp_seq=3 ttl=128 time=0.314 ms
        64 bytes from 172.19.0.61 (172.19.0.61): icmp_seq=4 ttl=128 time=0.323 ms
        ^C
        --- example-company.com ping statistics ---
        4 packets transmitted, 4 received, 0% packet loss, time 3044ms
        rtt min/avg/max/mdev = 0.221/0.298/0.334/0.045 ms
      4. Configure Kerberos.

        Add the following lines to the /etc/krb5.conf configuration file.

            default_tgs_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
            default_tkt_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
            permitted_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
        # To opt out of the system crypto-policies configuration of krb5, remove the
        # symlink at /etc/krb5.conf.d/crypto-policies which will not be recreated.
        includedir /etc/krb5.conf.d/
        [logging]
            default = FILE:/var/log/krb5libs.log
            kdc = FILE:/var/log/krb5kdc.log
            admin_server = FILE:/var/log/kadmind.log
        [libdefaults]
            dns_lookup_realm = false
            ticket_lifetime = 24h
            renew_lifetime = 7d
            forwardable = true
            rdns = false
            pkinit_anchors = FILE:/etc/pki/tls/certs/ca-bundle.crt
            spake_preauth_groups = edwards25519
        #    default_realm = EXAMPLE.COM
            default_ccache_name = KEYRING:persistent:%{uid}
            default_tgs_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
            default_tkt_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
            permitted_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
        [realms]
        # EXAMPLE.COM = {
        #     kdc = kerberos.example.com
        #     admin_server = kerberos.example.com
        # }
        [domain_realm]
        # .example.com = EXAMPLE.COM
        # example.com = EXAMPLE.COM
      5. Discover the AD domain.

        realm discover example-company.com
        [user1@mycentos root]$ realm discover example-company.com
        example-company.com
          type: kerberos
          realm-name: EXAMPLE-COMPANY.COM
          domain-name: example-company.com
          configured: no
          server-software: active-directory
          client-software: sssd
          required-package: oddjob
          required-package: oddjob-mkhomedir
          required-package: sssd
          required-package: adcli
          required-package: samba-common-tools
      6. Join the Linux client to the AD domain.

        sudo realm join -U Administrator example-company.com

        Run the realm list command. If the output is similar to the following, the Linux client has joined the AD domain.

        [user1@mycentos root]$ realm list
        example-company.com
          type: kerberos
          realm-name: EXAMPLE-COMPANY.COM
          domain-name: example-company.com
          configured: kerberos-member
          server-software: active-directory
          client-software: sssd
          required-package: oddjob
          required-package: oddjob-mkhomedir
          required-package: sssd
          required-package: adcli
          required-package: samba-common-tools
          login-formats: %U@example-company.com
          login-policy: allow-realm-logins
  3. Run the id command to check the status of an AD domain user.

    id testuser@example-company.com

    Output similar to the following indicates that the AD domain user is correctly identified.

    [user1@mycentos root]$ id usera1@example-company.com
    uid=371801107(usera1@example-company.com) gid=371800513(domain users@example-company.com) groups=371800513(domain users@example-company.com)
  4. Grant logon permissions to AD domain users.

    • Grant logon permission to a specific user.

      sudo realm permit usera1@example-company.com
      sudo realm permit userb1@example-company.com userb2@example-company.com 
    • Grant logon permission to a specific group.

      sudo realm permit -g 'Security Users'
      sudo realm permit -g 'Domain Users' 'Domain Admins'
    • Grant logon permission to all users.

      sudo realm permit --all
    • Deny logon permission to all users.

      sudo realm deny --all
  5. Add sudo permissions for an AD domain user.

    Run the following command to open the sudo configuration file, and then add sudo permissions as needed.

    sudo vim /etc/sudoers.d/domain_admins
    • Add sudo permissions for a specific user.

      usera1@example-company.com     ALL=(ALL)   ALL
      userb2@example-company.com     ALL=(ALL)   ALL
    • Add sudo permissions for a specific group.

      %admingroupc1@example-company.com     ALL=(ALL)   ALL
    • Add sudo permissions for a group whose name contains multiple words.

      %domain\ admins@example-company.com       ALL=(ALL)       ALL
  6. Configure SSH logon.

    1. Open the /etc/ssh/sshd_config configuration file and modify the logon setting as follows:

      PasswordAuthentication yes
    2. Run the command for your operating system to restart the SSHD service.

      • CentOS

        service sshd restart
      • Ubuntu

        service ssh restart
  7. Log on to the Linux client as an AD domain user.

    ssh localhost -l usera1@example-company.com

    Output similar to the following indicates that you have successfully logged on to the Linux client as an AD domain user.

    [user1@mycentos root]$ ssh localhost -l usera1@example-company.com
    The authenticity of host 'localhost (127.0.0.1)' can't be established.
    ECDSA key fingerprint is SHA256:t/sEr63muG4UvBiAODXW9cHuMDBUlWUXO3cQ4xxmN78.
    Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
    Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
    usera1@example-company.com@localhost's password:
    Welcome to Alibaba Cloud Elastic Compute Service !
    Activate the web console with: systemctl enable --now cockpit.socket
  8. Mount the SMB file system.

    1. Install the required mount tools.

      • Ubuntu

        sudo apt-get install keyutils cifs-utils
      • CentOS

        sudo yum install keyutils cifs-utils
    2. Query user and ticket information.

      Run the id and klist commands to view the UID, GID, and ticket information for the current user.

      [usera1@example-company.com@mycentos ~]$ klist
      Ticket cache: KCM:371801107:64031
      Default principal: usera1@EXAMPLE-COMPANY.COM
      Valid starting       Expires              Service principal
      08/31/2021 07:56:42  08/31/2021 17:56:42  krbtgt/EXAMPLE-COMPANY.COM@EXAMPLE-COMPANY.COM
              renew until 09/07/2021 07:56:42
      [usera1@example-company.com@mycentos ~]$ id
      uid=371801107(usera1@example-company.com) gid=371800513(domain users@example-company.com) groups=371800513(domain users@example-company.com),371801110(groupa@example-company.com)
    3. Run the following command to mount the file system.

      sudo mount -t cifs //205dee4****-uub48.us-west-1.nas.aliyuncs.com/myshare /mnt -o vers=2.1,sec=krb5,cruid=371801107,uid=371801107,gid=371800513  --verbose

      Replace 205dee4****-uub48.us-west-1.nas.aliyuncs.com with your file system's mount target address.

      Note

      If you selected Enable Encryption in Transit in the NAS console, you must use the vers=3.0 option to mount the file system.

  9. Configure automatic mounting.

    To automatically mount the file system after the Linux client restarts, configure automatic mounting.

    1. In the /etc/auto.master configuration file, add the following line:

      /share    /etc/auto.cifs    --timeout=30 --ghost
    2. Modify the /etc/auto.cifs configuration file as shown in the following example:

      * -fstype=cifs,vers=2.1,sec=krb5,cruid=${UID},uid=${UID},gid=${GID},file_mode=0700,dir_mode=0700 ://205dee4****-uub48.us-west-1.nas.aliyuncs.com/myshare/&

      The following list describes the key parameters. Replace the values with your actual information.

      • cruid and uid: The ID of the local user usera1.

      • gid: The group ID of the local user usera1.

      • 205dee4****-uub48.us-west-1.nas.aliyuncs.com: The mount target address.

        In the NAS console, navigate to the File System List page. Find your file system and click the image..png icon. In the resulting list, find the Mount Target column and hover over the 挂载点地址.png icon to obtain the mount target address.

    3. Restart the autofs service.

      systemctl restart autofs.service
    4. Verify the automatic mount configuration.

      For example, you create the //205dee4****-uub48.us-west-1.nas.aliyuncs.com/myshare/usera1 directory and grant the user usera1 full permissions.

      After you log on as the AD domain user, run the ls /share/usera1 command. If the contents of the usera1 directory in the SMB file system are displayed, the automatic mount is configured correctly.

Method 2: Mount on a non-domain-joined client

  1. Log on to the Linux client.

  2. Connect to the AD server.

    • Ubuntu

      1. Install the AD configuration packages.

        sudo apt-get -y install keyutils cifs-utils krb5-user
      2. Configure DNS.

        1. Run the following commands to stop automatic DNS updates.

          sudo systemctl disable systemd-resolved
          sudo systemctl stop systemd-resolved
        2. Add the IP address of the AD server to the /etc/resolv.conf file.

          # Generated by NetworkManager
          search example-company.com
          nameserver 172.19.0.61
        3. Run the ping command to ping the AD server name and verify connectivity.

          user1@myubuntu:/home$ ping example-company.com
          PING example-company.com (172.19.0.61) 56(84) bytes of data.
          64 bytes from 172.19.0.61 (172.19.0.61): icmp_seq=1 ttl=128 time=0.274 ms
          64 bytes from 172.19.0.61 (172.19.0.61): icmp_seq=2 ttl=128 time=0.289 ms
          64 bytes from 172.19.0.61 (172.19.0.61): icmp_seq=3 ttl=128 time=0.270 ms
          64 bytes from 172.19.0.61 (172.19.0.61): icmp_seq=4 ttl=128 time=0.273 ms
          ^C
          --- example-company.com ping statistics ---
          4 packets transmitted, 4 received, 0% packet loss, time 3073ms
          rtt min/avg/max/mdev = 0.270/0.276/0.289/0.007 ms
    • CentOS

      1. Install the AD configuration packages.

        sudo yum install keyutils cifs-utils krb5-workstation
      2. Configure DNS.

        Write the AD server IP address to /etc/resolv.conf and delete the default DNS server. Run the ping command: ping the AD server name to verify connectivity.

        [user1@mycentos root]$ ping example-company.com
        PING example-company.com (172.19.0.61) 56(84) bytes of data.
        64 bytes from 172.19.0.61 (172.19.0.61): icmp_seq=1 ttl=128 time=0.221 ms
        64 bytes from 172.19.0.61 (172.19.0.61): icmp_seq=2 ttl=128 time=0.334 ms
        64 bytes from 172.19.0.61 (172.19.0.61): icmp_seq=3 ttl=128 time=0.314 ms
        64 bytes from 172.19.0.61 (172.19.0.61): icmp_seq=4 ttl=128 time=0.323 ms
        ^C
        --- example-company.com ping statistics ---
        4 packets transmitted, 4 received, 0% packet loss, time 3044ms
        rtt min/avg/max/mdev = 0.221/0.298/0.334/0.045 ms
      3. Configure Kerberos.

        Add the following lines to the /etc/krb5.conf configuration file.

            default_tgs_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
            default_tkt_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
            permitted_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
        # To opt out of the system crypto-policies configuration of krb5, remove the
        # symlink at /etc/krb5.conf.d/crypto-policies which will not be recreated.
        includedir /etc/krb5.conf.d/
        [logging]
            default = FILE:/var/log/krb5libs.log
            kdc = FILE:/var/log/krb5kdc.log
            admin_server = FILE:/var/log/kadmind.log
        [libdefaults]
            dns_lookup_realm = false
            ticket_lifetime = 24h
            renew_lifetime = 7d
            forwardable = true
            rdns = false
            pkinit_anchors = FILE:/etc/pki/tls/certs/ca-bundle.crt
            spake_preauth_groups = edwards25519
        #    default_realm = EXAMPLE.COM
            default_ccache_name = KEYRING:persistent:%{uid}
            default_tgs_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
            default_tkt_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
            permitted_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
        [realms]
        # EXAMPLE.COM = {
        #     kdc = kerberos.example.com
        #     admin_server = kerberos.example.com
        # }
        [domain_realm]
        # .example.com = EXAMPLE.COM
        # example.com = EXAMPLE.COM
  3. Use a local user account to obtain and cache the Kerberos ticket information.

    1. Create a new local user and record the user's UID and GID.

      useradd usera1
      su - usera1
      id
      [root@iZrj9gqbtl7kefeqxxx ~]# useradd usera1
      [root@iZrj9gqbtl7kefeqxxx ~]# su - usera1
      [usera1@iZrj9gqbtl7kefeqxxx ~]$ id
      uid=1004(usera1) gid=1004(usera1) groups=1004(usera1)
    2. As the new local user, obtain a Kerberos ticket for the AD user.

      kinit administrator@EXAMPLE-COMPANY.COM
      klist
      user1@iZrj9gqbtl7xxx          :~$ kinit administrator@EXAMPLE-COMPANY.COM
      Password for administrator@EXAMPLE-COMPANY.COM:
      user1@iZrj9gqbtl7xxx          :~$ klist
      Ticket cache: FILE:/tmp/krb5cc_1000
      Default principal: administrator@EXAMPLE-COMPANY.COM
      Valid starting       Expires              Service principal
      09/08/2021 05:47:53  09/08/2021 15:47:53  krbtgt/EXAMPLE-COMPANY.COM@EXAMPLE-COMPANY.COM
              renew until 09/09/2021 05:47:49
      user1@iZrj9gqbtl7xxx          :~$
  4. Mount the SMB file system.

    1. Install the required mount tools.

      • Ubuntu

        sudo apt-get install keyutils cifs-utils
      • CentOS

        sudo yum install keyutils cifs-utils
    2. Run the following command to mount the file system.

      sudo mount -t cifs //205dee4****-uub48.us-west-1.nas.aliyuncs.com/myshare /mnt -o vers=2.1,sec=krb5,cruid=1004,uid=1004,gid=1004  --verbose

      Replace 205dee4****-uub48.us-west-1.nas.aliyuncs.com with your file system's mount target address.

      Note

      If you selected Enable Encryption in Transit in the NAS console, you must use the vers=3.0 option to mount the file system.

  5. Configure automatic mounting.

    To automatically mount the file system after the Linux client restarts, configure automatic mounting.

    1. In the /etc/auto.master configuration file, add the following line:

      /share    /etc/auto.cifs    --timeout=30 --ghost
    2. Modify the /etc/auto.cifs configuration file as shown in the following example:

      * -fstype=cifs,vers=2.1,sec=krb5,cruid=${UID},uid=${UID},gid=${GID},file_mode=0700,dir_mode=0700 ://205dee4****-uub48.us-west-1.nas.aliyuncs.com/myshare/&

      The following list describes the key parameters. Replace the values with your actual information.

      • cruid and uid: The ID of the local user usera1.

      • gid: The group ID of the local user usera1.

      • 205dee4****-uub48.us-west-1.nas.aliyuncs.com: The mount target address.

        In the NAS console, navigate to the File System List page. Find your file system and click the image..png icon. In the resulting list, find the Mount Target column and hover over the 挂载点地址.png icon to obtain the mount target address.

    3. Restart the autofs service.

      systemctl restart autofs.service
    4. Verify the automatic mount configuration.

      For example, you create the //205dee4****-uub48.us-west-1.nas.aliyuncs.com/myshare/usera1 directory and grant the user usera1 full permissions.

      After you log on as the AD domain user, run the ls /share/usera1 command. If the contents of the usera1 directory in the SMB file system are displayed, the automatic mount is configured correctly.

Managing SMB ACLs with cifsacl

Use the getcifsacl and setcifsacl commands to manage ACLs for the SMB file system.

getcifsacl usera1/
usera1@example-company.com@myubuntu:/mnt$ getcifsacl usera1/
REVISION:0x1
CONTROL:0x8404
OWNER:S-1-5-21-2849381876-3817135681-4198507328-1107
GROUP:S-1-5-21-2849381876-3817135681-4198507328-513
ACL:S-1-5-21-2849381876-3817135681-4198507328-1107:ALLOWED/I/FULL
ACL:S-1-3-0:ALLOWED/OI|CI|IO|I/FULL
ACL:S-1-5-18:ALLOWED/OI|CI|I/FULL
ACL:S-1-5-32-544:ALLOWED/OI|CI|I/FULL
ACL:S-1-5-21-3076751034-3769290925-1520581464-512:ALLOWED/OI|CI|I/FULL
sudo setcifsacl -a "ACL:S-1-5-21-3076751034-3769290925-1520581464-513:ALLOWED/OI|CI|I/FULL" usera1/
usera1@example-company.com@myubuntu:/mnt$ sudo setcifsacl -a "ACL:S-1-5-21-3076751034-3769290925-1520581464-513:ALLOWED/OI|CI|I/FULL" usera1/
usera1@example-company.com@myubuntu:/mnt$ getcifsacl usera1
REVISION:0x1
CONTROL:0x8004
OWNER:S-1-5-21-2849381876-3817135681-4198507328-1107
GROUP:S-1-5-21-2849381876-3817135681-4198507328-513
ACL:S-1-5-21-2849381876-3817135681-4198507328-1107:ALLOWED/I/FULL
ACL:S-1-3-0:ALLOWED/OI|CI|IO|I/FULL
ACL:S-1-5-18:ALLOWED/OI|CI|I/FULL
ACL:S-1-5-32-544:ALLOWED/OI|CI|I/FULL
ACL:S-1-5-21-3076751034-3769290925-1520581464-512:ALLOWED/OI|CI|I/FULL
ACL:S-1-5-21-3076751034-3769290925-1520581464-513:ALLOWED/OI|CI|I/FULL
usera1@example-company.com@myubuntu:/mnt$