[Samba] Windows: Forcing a Guest Login.

Adam Nielsen adam.nielsen at uq.edu.au
Wed Feb 14 03:51:40 GMT 2007


> How do you get windows to access a share as a guest?

But what's a "guest"?  Is that someone logging in with a blank
username?  Or is it someone logging in with the username "Guest" and a
blank password?  Or is it any unknown username regardless of the
password?

> - Windows by default tries to login to a share with its current
> username/password

Correct, so if you allow your existing users to access all the "guest"
shares, it shouldn't matter who they connect as.

> - Windows opens a login/password box for user

As it does when you connect as an invalid username or password, or the
account you're connecting as doesn't have enough access.  Grant the
connecting user access if you don't want the login box to appear.

> - There is no way to force windows to connect as a guest

But Windows asks you for a username to connect as, just log in with the
"Guest" username (isn't that how Windows itself works?  Don't people
always tell you to disable the Guest account on a new Windows
installation for this reason?)

> 2. "map to guest" option to default failed logins to guest.
> #2 is viable, however i've found users' often end up logged in as
> guest when they intended to login as a user.  this is a severely
> suboptimal hack.

I guess it's up to how you define your guest account.  If you create an
account called Guest and give it a blank password, then people can log
in as this guest account or their own account by typing in the
appropriate username, and there shouldn't be any mix up.

If you were hoping for an easy solution where people don't have to log
in at all to access the guest shares, then you'll have to make sure all
your legitimate users have access to the appropriate guest shares too,
then use one of the 'map to guest' options.  I'm not aware of any other
way of doing it.

> the nub of the issue is that /Windows/ needs some way of being able to
> connect as guest.

Since Microsoft use an actual Guest account I expect their method is
related to that (whether you have to log in as a Guest, or invalid
accounts are automatically mapped to guest I don't know.  Perhaps
trying to connect to an XP box with the Guest account enabled might
tell you.)

I think you'll have to use a 'map to guest' option with Samba, that's
really the only way having things "just work" (assuming, as you say,
that people don't accidentally log themselves on as a guest.)

Cheers,
Adam.


More information about the samba mailing list