[Samba] Windows and Linux can't access Samba at the same time.

Rowland Penny rowlandpenny at googlemail.com
Wed Feb 12 08:34:18 MST 2014


On 12/02/14 13:52, Adam Barnes wrote:
> Right i'm not making any progress with this and now ive got myself 
> totally confused..
> No matter what I try it comes back to the same thing security = share 
> or user, all the other settings don't seem to make a difference.
> I can't think of a reason why this would be, I don't know linux well 
> enough to know how it passes the credentials.
>
> I really don't know what to try now.
>
>
> On 10 February 2014 21:52, Rowland Penny <rowlandpenny at googlemail.com 
> <mailto:rowlandpenny at googlemail.com>> wrote:
>
>     On 10/02/14 18:58, Sebastian Arcus wrote:
>
>         On 10/02/14 17:36, Rowland Penny wrote:
>
>             On 10/02/14 16:42, Sebastian Arcus wrote:
>
>                 On 10/02/14 09:32, Rowland Penny wrote:
>                 </snip>
>
>
>                     Hi, you might think that you are running a Ubuntu
>                     samba server, but you are not, you are running a
>                     workgroup.
>
>                 Hmm - I'm not sure the above makes sense. He is
>                 running samba in server mode on the Ubuntu machine -
>                 so he is running a samba server. Unless you are trying
>                 to say something about Samba in DC mode, or even
>                 something else? Samba in workgroup mode is still a
>                 samba server.
>
>
>             So every windows machine that is part of a workgroup is
>             also a server, no, they are all clients, there are no
>             servers in a workgroup.
>
>         Hmm - actually yes. If a Windows machine shares out any
>         folder/directory, it is automatically an SMB server. It acts
>         as an SMB file server, sharing out SMB shares - so it is one.
>         At least in the way client-server relationships have been
>         understood in the world of networking since times immemorial.
>         If you mean there are no *logon* servers in the world of SMB
>         workgroups, that is correct. But there is no limit on how many
>         SMB servers you can have in a workgroup. Every machine that
>         runs a piece of SMB software in server mode and shares out
>         directories - being a Windows, OSX, Linux etc. machine - is
>         automatically an SMB server because it is acting as one. Just
>         as you can have as many FTP or NFS servers as you like in a
>         network.
>
>         Just because in the MS Windows world sharing folders out and
>         accessing folders shared on other machines is lumped together
>         in one package as "file and folder sharing" doesn't mean the
>         distinction does not exist in reality.
>
>     Have you ever administered a workgroup? once you get over 10 or so
>     computers, it gets hard, over 20 extremely hard, any more than
>     this virtually impossible. If workgroups are so good, why did
>     microsoft come up with their servers?
>
>     Sharing a directory does not make a pc a server.
>
>
>
>         </snip>
>
>                     The smb.conf on the raspberry pi needs to be
>                     basically the same as the ubuntu one but without
>                     the shares.
>
>                 I'm not sure about that one either. The pi is acting
>                 as a samba client. It should be able to just connect
>                 to any Samba compliant server - even a Windows machine
>                 with file sharing enabled. Can't quite see it needing
>                 the same smb.conf as the server.
>
>
>             Well yes, I will give you this one, but the users on the
>             pi will still have to be users on any workgroup computer
>             that they want to connect to.
>
>
>         Not strictly true. At least several versions of Windows
>         (starting from about Windows Vista, if I remember correctly)
>         will kindly prompt you for a username/password  combination
>         when accessing an SMB server where the credentials of the user
>         currently logged in locally have been rejected. Than you can
>         input on the spot whatever username/password combination the
>         SMB server will accept. So no, you don't really have to have a
>         user account already setup on the client in order to access
>         the SMB server - it might be convenient, but you don't have
>         to. Same goes for the smbclient command line tool in Linux,
>         which will happily accept username/password combinations as
>         arguments.
>
>     OK, lets put it this way, if you want to consistently connect from
>     pc A to pc B in a workgroup, pc B must know the user on pc A or it
>     will ask for the username & password of the user on pc A every
>     time it connects.
>
>
>     -- 
>     To unsubscribe from this list go to the following URL and read the
>     instructions: https://lists.samba.org/mailman/options/samba
>
>
OK, try using this smb.conf as a starting point:

[global]
     workgroup = WORKGROUP
     netbios name = UBUNTUSERVER
     server string = Samba Server Version %v
     log file = /var/log/samba/log.%m
     max log size = 50
     security = user
     unix extensions = no

[Music]
valid users = MD,XB
path = /home/adam/Desktop/Music
browseable = yes
read only = yes
write list = MD
wide links = yes

Restart the nmbd & smbd daemons:

service smbd restart
service nmbd restart

Create yours users on the ubuntu server and on the machine(s) that they 
will connect from, use the same password.

To create a user on ubuntu:

adduser <username>

Now, on the ubuntu server, tell samba about the users:

smbpasswd -a <username>

You will be asked for a password for the new samba user, enter the same 
password as when you created the unix user.

You should now be able to connect to the server, you will probably be 
asked for a password.

Rowland


More information about the samba mailing list