Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have Samba running on an FC5 box, with a public share and several secured shares accessible from our WinXP clients. I've a couple of questions people might be able to help me with:
1. I'd like to enable access to the public share with no credentials being required (security = share in [global] section) *and* require credentials to access the secured shares (security = users). Can this somehow be done - ie, specify the security at the share level, rather than in the [global] section? I seem to be only able to have one *or* the other - either everything is accessible with no credentials, or everything requires credentials, depending upon the value of security in [global].
I've noted a suggested solution posted in thread 468244 (specify guest ok = yes, guest account = guest, guest only = no in [global] section), but I still have to supply security credentials for the public share after making these changes - that solution has not worked for me. Edit: the suggested solution was actually for parameters in the public share section - my typo. I had the parameters in the correct section.
2. With security = users in effect, I can only connect to one secured share at a time from a given WinXP client (although different shares are simultaneously accessible from different WinXP clients). Windows pops up "Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed..." If I have the credentials for several secured shares, why shouldn't I be able to connect to them all from the same WinXP session? Is this a Windows constraint, or a Samba constraint?
Distribution: Linux Redhat 9.0, Fedora Core 2,Debian 3.0, Win 2K, Win95, Win98, WinXp Pro
Posts: 344
Rep:
Hi JonBL. I too have a FC5 box running samba. Before that it was FC2. Anyway, the way that I would handle your situation (if I understand correctly) is to establish the share that you want open access to and use the guest account for just that share. Not globally, just that share. As far as accessing multiple shares, I connect to four of them simultaneously all the time. I simply map the share from Windows as a networked drive and stay connected. If I reboot windows (LOLLLLLLL) it reconnects. If you didn't want to map it as a drive, it might be difficult for windows to run four (or whatever) number of explorer apps running simultaneously. The problem is with windows I'm saying, not samba. That is what linux is for: multiple simultaneous connections. That's it's speciality!
Thanks Scooter for your reply. In my original post for solution proposed by thread 468244, I indicated the suggested parameters were in the [global] section - they are actually in the [public] section as a follow-up edit shows - my typo. But the proposed solution does not help me.
Passwords exist in the smbpasswd file for users jon and chiarina. security in the [global] section defaults to user (as I understand it).
Back on the WinXP client, I can navigate "My Network Places" -> "Entire Network" -> "Microsoft Windows Network" -> "Blakes", and see entry "Blakes-fc5", as expected. Click on that, and I get a "Connect to localhost.localdomain" login dialog, and I can log in with credentials for valid user jon (or chiarina). "Blakes-fc5" then expands to reveal shares "chiarina", "jon" and "public". When I then click on "jon" (or "chiarina") or "public", I can see the files in the share. When I click on the other secured share, another login dialog is displayed, but I then get the message I identified in my original post when I supply its username and password credentials.
I've mapped drive Z: to /home/jon after connecting with credentials for [jon], and drive Z: is now a networked drive as expected. I haven't mapped the public share, yet. When I reboot the WinXP client, drive Z: is still there, but when I click on it I get a "Connect to" login dialog for user jon. If I supply the correct password, I'm in.
Your response indicates you do not have to re-supply connect credentials for a mapped drive to a secured share after a reboot of your WinXP client, as I seem to have to. And as noted above, I still can't get to the public share until I supply a password for jon or chiarina.
I'm curious about how you defined your secured shares in a way that allows you to access all of them from one WinXP session, ie, how you avoided the "Connect to" dialog when you click on a drive mapped to a secured share. Would you be able to show us your smb.conf file?
And I've still got no idea about how to provide access to [public] without first supplying a password, other than setting security = share in the [global] section. If I do that, then there is no security on the [jon] or [chiarina] shares... Surely Samba can provide open access to some shares, and protected shares to others?
There's no need to change your security mode to share in any case.
In you global meta-service, add
Code:
map to guest = bad user
& use this for your public meta -service
Code:
[public]
comment = Public read-only
path = /usr/samba/public
read only = no
guest ok = yes
Thats it, prior to this give the ownership of /usr/samba/public to nobody:nodody & you are done. You do not need to login to access this share. Any user from any box (as per your host allow) will be able to read write & cd into this & further directory & all the time will use the credentials of nobody:nobody.
Apart from the above code, you can have security = user in this smb.conf & make it work for authenticated access as well(in other meta-services).
Thanks, Amit. Your suggestion has fixed the login dialog issue on the [public] share. On the WinXP client, I've mapped drive X: to [public], and drives Y: and Z: to [chiarina] and [jon] respectively. When I click on X:, I see the contents of /usr/samba/public without seeing a connection login dialog first. If I then click on Y: or Z:, I get a connection login dialog, but when I supply the correct credentials, I get a Windows error "Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed." What does this mean?
I have to reboot the WinXP client befor I can successfully restore the connection for either Y: or Z:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.