transfer samba configuration between installations?

I set up a new server under 12.3.
on this I would like to set up a samba server with the same settings as on my former server running under 12.1 (with SystemV).
Is there a way to transfer the samba configuration from the old system without having to configure everything by hand again?

Yes, just copy it over.
I haven’t changed my samba config since 9.x days I think…

The file is: /etc/samba/smb.conf
Or better copy the whole directory /etc/samba/ if you had a more sophisticated setup with different samba users and so on.

It depends of you Samba server complexity. Is it a standalone server? A domain member server? A domain controller server? Samba documentation gives some migration information here.

As wolfi323 said, in the simplest case, just copy over. It becomes more complicated if you have samba user accounts configured because you need to have the same UID/GID than the old server. In that case, you will need to copy your old system accounts files (/etc/passwd, /etc/shadow, and /etc/group).