Carlos Alberto Balseiro Mayi
2025-Jan-18 10:04 UTC
[Samba] Different behavior when client uses "sec=none" and when provides bad user (mapped to guest)
mount -t cifs //192.168.1.4/descargas/MiSTer /media/fat/cifs -o sec=none mount -t cifs //192.168.1.4/descargas/MiSTer /media/fat/cifs -o username=badusertest El 2025-01-18 10:49, Rowland Penny via samba escribi?:> I think I see what is happening here, but I need to see the commands > you are using to connect to the share (where you are using 'sec=') to > confirm or deny my thinking. > > Rowland
Rowland Penny
2025-Jan-18 10:32 UTC
[Samba] Different behavior when client uses "sec=none" and when provides bad user (mapped to guest)
On Sat, 18 Jan 2025 11:04:21 +0100 Carlos Alberto Balseiro Mayi via samba <samba at lists.samba.org> wrote:> mount -t cifs //192.168.1.4/descargas/MiSTer /media/fat/cifs -o > username=badusertestWhen you run the above command (by the way, mount.cifs has nothing to do with Samba), the mount command sends the user 'badusertest' and as that user does not exist, Samba maps it the 'guest' user and allows access to the 'descargas' share because you have 'map to guest = Bad User' in global and 'guest ok = Yes' in the share.> > mount -t cifs //192.168.1.4/descargas/MiSTer /media/fat/cifs -o > sec=none >When you send 'sec=none', no username is sent, now I do not know what is doing it (it could be the mount program, Samba or something Truenas has added), but something is using the username 'nobody' and that name does exist and so it isn't getting mapped to the guest user (even though it is the 'guest' user) and is denied access. I do not know how long this has been going on (I personally have never used 'sec=none') and, if it is a bug, I have no idea what needs fixing, Samba, cifs-utils or Truenas. Rowland