External Samba storage configuring issue

I have install NC 28.04 in a Ubuntu 23.04 server. It is manual installation with apache2 and mariadb. I have facing issue in confuguring samba server. Our samba server version is 3.5.6. I have installed both php-smbclient and smbclient. From command line through smbclient I can login to our samba server but in nextcloud it throwing error: External storage not available: Invalid attribute response. Our existing NC 15.0 is working fine with this samba server.

Any help will be apprciated.