Mount SMB/CIFS share in LXC containers with different credentials? Bind mounts won’t do that. Bind mounts just pass a host directory into a container, same permissions and all. If you need different credentials per container, you have to mount the share on the Proxmox host first, then bind mount that mount point into each LXC.

Why bind mounts don’t work for this
Bind mounts are great for sharing a host directory with a container. But the container sees the host’s mount, including the credentials used to mount it. You can’t have container A use one SMB user and container B use another if they’re both bind mounting the same host path. The host mount already authenticated with one set of credentials, and that’s what every container gets.

The workaround: mount on the host, bind mount into containers
Mount the SMB share on the Proxmox host using /etc/fstab or a systemd mount unit. Then bind mount that directory into each LXC container. Each container gets the same data, but the host handles the authentication. If you need different credentials for different containers, you’d have to mount the share multiple times on the host with different mount points, then bind mount each one into the appropriate container.
Here’s how to mount an SMB share on the host with mount.cifs:
mount -t cifs //server/share /mnt/smbshare -o username=user,password=pass,uid=1000,gid=1000
Then bind mount it into a container by adding a line to the container’s config file (/etc/pve/lxc/<CTID>.conf):
mp0: /mnt/smbshare,mp=/mnt/smbshare
Restart the container and the share is there. But again, every container that bind mounts /mnt/smbshare sees the same credentials. To use different credentials, mount the share twice on the host:
mount -t cifs //server/share1 /mnt/smb_user1 -o username=user1,password=pass1
mount -t cifs //server/share2 /mnt/smb_user2 -o username=user2,password=pass2
Then bind mount /mnt/smb_user1 into container A and /mnt/smb_user2 into container B. That’s the only way to get different credentials per container without mounting the share directly inside each container, which LXC doesn’t support natively.
Or just mount inside the container
If the container is privileged and has the right capabilities, you can install cifs-utils inside it and mount the SMB share directly. That gives you per-container credentials without host-level mounts. But unprivileged containers can’t mount filesystems, so this only works for privileged ones. And it’s a bit of a pain to manage.
Honestly, for most homelab setups, mounting on the host and bind mounting is simpler. You lose per-container credentials, but you gain a single point of management. If you really need different credentials, mount the share multiple times on the host with different mount points. It’s hacky but it works.
If you’re already using Proxmox shared storage, check out Proxmox shared storage NFS: add the share and get the options right for a similar setup with NFS.