I my find the bug, when exporting the config I see that the user that have access to the share is declared as *4.
The correct user for me would be test.
It is working with the guest account.
add directory=sd1-part1 name=test require-encryption=yes valid-users=guest,*4
smbclient -L 192.168.88.1 --no-pass
Now it’s working for me with these commands.
sudo mount -t cifs -o guest,vers=3.0,uid=$(id -u $USER),gid=$(id -g $USER) //192.168.88.1/sd1-part1 share
sudo mount -t cifs -o username="user",password="user1234",domain="domain",vers=3.0,uid=$(id -u $USER),gid=$(id -g $USER) //192.168.88.1/share share
And my config as this:
[admin@MikroTik] > ip/smb/export verbose show-sensitive
# 2024-04-03 12:56:03 by RouterOS 7.14.2
# software id = MG8A-1B17
#
# model = RB750Gr3
# serial number = 6F3A08AFE05D
/ip smb users
set [ find default=yes ] disabled=no name=guest password="" read-only=no
add disabled=no name=user password=user1234 read-only=no
/ip smb
set comment=MikrotikSMB domain=domain enabled=auto interfaces=all
/ip smb shares
set [ find default=yes ] directory=flash/pub disabled=yes invalid-users="" name=pub read-only=no require-encryption=no \
valid-users=""
add directory=sd1-part1 disabled=no invalid-users="" name=share read-only=no require-encryption=no valid-users=guest,user
[admin@MikroTik] >