I have to share cd-rom and printer to network which contains windows and linux machines. For this solve I have got: a rpi 3 b+, hp deskjet 2520hc printer and cd-rom reader/writer (transcend).
Install the samba server:
rpi ~$ sudo apt update rpi ~$ sudo apt full-upgrade rpi ~$ sudo apt install samba
It description (
apt show samba) says:
SMB/CIFS file, print, and login server for Unix
Samba is an implementation of the SMB/CIFS protocol for Unix systems, providing support for cross-platform file and printer sharing with Microsoft Windows, OS X, and other Unix systems.
/etc/smb.conf and configure the server to your needs. There are some examples in it and you get tons of information for this on the internet.
To connect a linux client to a smb share you need smbclient and/or cifs-utils.