Configure Samba to List Available Shares Without Asking For Password

I can’t figure out how to get my Rockstor Samba shares to display in Windows without it asking me for a username and password. I’m not referring to authentication for each individual share, I just want to SEE what shares are available without having to enter credentials. My installation is completely stock, except I removed the password for user “nobody” (as one of my countless attempts to get this working as intended). The moment I enter \\HOGSTORE in the Explorer address bar, a username/password prompt comes up, which I do not want. Would greatly appreciate any help getting this sorted out.

Running Rockstor 4.6.1 on opensuse tumbleweed with all latest updates to both

@GoreMaker welcome to the Rockstor community.

Are you using the wsdd Rockon to announce the Rockstor samba server in a windows network?

Also, clarifying question, you want any user to be able to see the shares under your HOGSTORE server without having access to the individual shares? Only if one wanted to enter the shares, then they would have to provide some user/password?

I can’t check right now, however, I believe on my box I can browse to the server and its published shares, but require a logon only when I’m trying to further drill into one of the shares, but it’s been that way for a long time, so not sure whether it’s only because I have stored the logon credentials for the various shares already …

Under Linux I think you can use smbadm show-shares -t -A HOGSTORE, but you’re asking specifically for a windows explorer view.

2 Likes

I was not using the wsdd Rockon. Figuring out how to get the server to announce itself was going to be my next step once I have the credentials issue figured out, but the wsdd Rockon appears to have resolved that. Thank you!

Yes, the behavior you describe is precisely the one I’m looking for, but without having to resort to using SMB1. I’m starting to think I can only accomplish this by adding specific Windows users to the smbusers file, but I’d much rather not.

so, when running the wsdd Rockon, and the server shows up in the Network Neighborhood, you still get the credential pop-up?

Apparently, in Windows the guest access is disabled by default, due to security concerns (valid, I think), but in a home network maybe you can enable this again.

And in conjunction with the “Guest Ok” on a share this might work?

2 Likes

Thank you SO much for that insight. I haven’t resolved the issue yet, but this is info I wasn’t able to find in my hours of searching yesterday. It would explain why I was able to list shares without credentials from the command line in a Linux box but not from Windows 10 (running 22H2).

Enabling Insecure guest logons in Windows and using the wsdd Rockon doesn’t appear to have resolved the issue, though. I did remember to reboot, just in case. I do have “guest ok = yes” in my samba config, along with a bazillion other things I’m sure aren’t even needed but that have accumulated in my hours of trying to get this working.

What really frustrates me is that this was all working fine with my old Synology server, but I’m pretty sure it used SMB1 behind the scenes as a workaround.

For completeness’ sake, here’s a copy of my current global Samba settings that I entered in the web GUI of Rockstor. Note that some of these were previous attempts to get the server to show up in in the Network section of Windows Explorer:

smb ports = 139 445
load printers = no
netbios name = HOGSTORE
guest account = nobody
auto services = global
guest ok = yes
preferred master = yes
passdb backend = smbpasswd
map to guest = bad user
name resolve order = bcast host lmhosts wins
local master = yes
server role = standalone server
dns proxy = no
server string = Rockstor SMB Server %v
usershare allow guests = Yes
os level = 34
invalid users = root
wins support = no
security = user
domain master = yes
case sensitive = no
2 Likes

I can’t test it at this time, but I found this here:

following the logic in the answer of that post, it seem you should remove the

map to guest = bad user

and for each share you enable the browseable option.

If a guest (i.e. essentially unauthenticated) user is allowed in the global section, then it should allow the visibility of the share level via the browseable option. However, once you try to access the actual share I would expect some authentication requirement.

2 Likes

But if I remove that line, then Samba doesn’t map unauthorized requests to the guest account. Which I confirmed by removing that line and still not having it function.

I’ve tried a bunch of other things. I switched from smbpasswd to tdbpam for the authentication backend.

I had already removed the password from the “nobody” user in linux, but then I realized I hadn’t done that using smbpasswd as well. That didn’t work, smbpasswd refuses to let me delete the password from the “nobody” user. So instead, I created a new user called “weaksauce” with the group “weaksauce”. Then I removed the password from that user (passwd -d weaksauce), and did the same thing with Samba (smbpasswd -n weaksauce). Then I changed “guest account = weaksauce”.

None of that worked. I still get a password prompt when I click on HOGSTORE in the Networks section of Windows.

I’ve wasted endless hours of my life on this, I don’t understand why it’s so complicated.

My most recent global config in the web gui:

netbios name = HOGSTORE
guest account = weaksauce
server string = Rockstor SMB Server %v
case sensitive = no
map to guest = bad user
guest ok = yes
invalid users = root
eventlog list = Application System Security SyslogLinux
server role = standalone server
preferred master = yes
log file = /var/log/samba/%m.log
domain master = yes
usershare allow guests = Yes
load printers = no

Sorry for the frustration level on that. It might be time to post this in a more Samba specific forum, since the functionality is part of the upstream. If I get more time and access later today or tomorrow, I’ll try to play around with the options as well.

2 Likes

Thank you for your time and effort on this, I really appreciate it

3 Likes

@GoreMaker, I have tried on a clean installation, but I run into the same issue as you’ve described.

I used the net view \\<servername> command to list available shares, but am getting the access denied error message (which is essentially the same outcome of you seeing the login popup when doing this through windows explorer/Network Neighborhood, which I confirmed is also happening for my setup).

I also did some searches based on that approach but have not come up with anything useful. I’ll keep looking and trying as time permits.

2 Likes

I created a Windows 7 VM, and everything works as expected there. So apparently this is indeed a recent Windows 10+ thing and not a Samba issue at all, my Samba configuration works fine. Seems there’s more to it than “Enable insecure guest logons” after all. These Windows changes really spin my head sometimes… :roll_eyes:

3 Likes

My Windows 11 setup did/does the same thing. However, it will MAP a drive on my NAS fine and THEN is shows the full tree of the share.

Just my 2c’s…

:sunglasses:

3 Likes