1 min read

Setting a user and group for Samba drives

The last time I tried to set a user and password on my Samba drive, I ran into a strange problem: even though my credentials were correct, I was still using the user and group I was logged in as, rather than the one Iโ€™d stored with the Samba config.

Luckily, these days thereโ€™s an easy way around it in /etc/fstab:

//mysvr/music /music cifs uid=1000,gid=1000,credentials=/etc/samba/credentials/mysvr

ย 

Simply adding the uid= and gid= lines fixed up the problem for me.