1821544 Members
2179 Online
109633 Solutions
New Discussion юеВ

Samba default user

 
SOLVED
Go to solution
Mauro Livi
Valued Contributor

Samba default user

Hi all,
Quick Samba question (perhaps somewhat stupid...but here goes). I have created a public directory and would like that to be accessible to all users. However, I'm finding that unless I create a Unix account for the user(s), they are unable to access the directory through Windows.
That is to say, if they have a Unix account, they can access just fine and everyone is happy. However, if they don't have a Unix account, they are presented with a Windows login prompt. I was under the impression that a publicly accessible directory is owned by the default user (smbnull) and therefore assumed that specific Unix accounts were not needed.
Wrong assumption???

Using HPUX 11.11 and Samba A.02.03.04

Thanks
Mauro
11 REPLIES 11
Mauro Livi
Valued Contributor

Re: Samba default user

I should perhaps elaborate a little more. If a user has a Unix account, the directory is accessible and the user is never prompted with any login dialogue box by windows. They go straight in and can freely access.
If however, a user does not have a Unix, account, they are presented with a windows login box (which usually fails anyway).

Thanks again
Mauro
avizen9
Esteemed Contributor

Re: Samba default user

you can create a generic account and share username password to all samba users which will be easy, let me know,

thanks
Mauro Livi
Valued Contributor

Re: Samba default user

Thanks for your reply, but it sounds like you are suggesting some sort of "guest" user, and my understanding is that Samba directories may be accessible by the "default" user (smbnull). I can create a "guest" user, but I don't see the point if it uses the "default" user anyway.
What I want is for people to be able to access the drive (through windows) when they are logged into the network with their "regular" network credentials. If a particular user does not have a Unix account, then use the "default" user (smbnull). Make sense?

Thanks again.
Mauro
Heironimus
Honored Contributor

Re: Samba default user

You haven't really provided enough information to do more than speculate wildly. Is the Samba server part of your Windows domain? Do you want it to be usable by any client at all or just by valid domain users?
Mauro Livi
Valued Contributor

Re: Samba default user

Heironimus...good points.

Yes - Samba server is part of Windows domain

I want it to be usable only by valid domain users.

Thanks

Mauro
Heironimus
Honored Contributor

Re: Samba default user

For a domain member where not all users have UNIX accounts you probably need to look at the "map to guest" parameter in smb.conf. You can have Samba map authenticated users without real UIDs to its guest account UID.
Mauro Livi
Valued Contributor

Re: Samba default user

Certainly makes sense. But I guess this is where I get confused. The excerpt below is from my smb.conf. This is where I would set a guest account mapping. However the text comment clearly states that it should default to smbnull. I can un-comment the guest account setting and see if I can force I guess.

# Default guest account is smbnull. If you want a guest account, you
# can specify other that should present in /etc/passwd
; guest account = smbnull
Heironimus
Honored Contributor

Re: Samba default user

And what is "map to guest" set to in your configuration?
Mauro Livi
Valued Contributor

Re: Samba default user

Well as it turns out, that is not specified. So in my case, would I set this to smbnull???

map to guest = smbnull

Heironimus
Honored Contributor
Solution

Re: Samba default user

No, "map to guest" defines when a connection will be remapped to the guest UID. You probably want it set to "bad uid", but you should read about it in the smb.conf man page to make that matches the behavior you're looking for.
Mauro Livi
Valued Contributor

Re: Samba default user

The map to guest setting did the trick. I had to read up a bit on man smb.conf, but I found what I was looking for.

Thanks again to all who responded.

Mauro