Samba Authentication Problems

Samba, I swear, will be the death of me.

Earlier this year, I had a samba server up and running perfectly on an Ubuntu Server with my SUSE 12.1 client (which this thread helped me troubleshoot throughout my setup), but I am now migrating hardware (and also switching the server to Arch Linux), which means a brand new setup of samba.

I transferred over my old smb.conf, modified its contents slightly to fit my retooled home server (contents pasted below), and I have the samba shares working at the guest privelige level without problems. However, whenever I attempt to invoke the share as a user, my password (and prseumably username as well) is not accepted. It continually prompts me for my password over and over again, which is the behavior to be expected if I had not configured my samba users. However, my users have definitely been added to the database. The output of

pdbedit -L -W

returns

user1:1000:
user2:1001:

The contents of my smb.conf are included below:

[global]
workgroup = WORKGROUP
passdb backend = tdbsam
netbios name = ArchServ
name resolve order = bcast host lmhosts wins
server string = “”
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
use client driver = yes
map to guest = Bad User
local master = yes
preferred master = yes
os level = 65
usershare allow guests = Yes
usershare max shares = 100
usershare owner only = False
security = share
#username map = /etc/samba/private/passdb.tbd

[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
guest ok = Yes
printable = Yes
print ok = Yes
browseable = No

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers

[Home - user1]
comment = user1’s Home folder
path = /home/user1
create mask = 0755
guest ok = yes
browsable = yes
write list = user1
public = yes

[Home - user2]
comment = user2’s Home folder
path = /home/user2
create mask = 0755
guest ok = yes
browsable = yes
write list = user2
public = yes

[Transmission Home]
comment = Torrent downloads
path = /home/transmission
create mask = 0775
guest ok = yes
browsable = yes
write list = user1 user2
public = yes

Also, my log.smbd outputs the following on server startup:

smbd version 3.6.5 started.
Copyright Andrew Tridgell and the Samba Team 1992-2011
[2012/06/22 10:08:43.021023, 0] param/loadparm.c:9378(load_usershare_shares)
load_usershare_shares: stat of /var/lib/samba/usershares failed. No such file or directory
[2012/06/22 10:08:46.254912, 0] param/loadparm.c:9378(load_usershare_shares)
load_usershare_shares: stat of /var/lib/samba/usershares failed. No such file or directory

Any and all help is greatly welcome, as this has been a major source of frustration for me. Thanks in advance for any replies!

This line: security = share
should be: security = user

Get rid of the error (see log) by running these commands (su to root first):

mkdir /var/lib/samba/usershares
chgrp users /var/lib/samba/usershares
chmod 1770 /var/lib/samba/usershares

But I don’t think that’s the problem.
BUT if you’re not going to have usershares you could instead comment out these lines:

#usershare allow guests = Yes
#usershare max shares = 100
#usershare owner only = False
#username map = /etc/samba/private/passdb.tbd

When I run the command pdbedit as root I get this response, which is somewhat different from yours:

pdbedit -L -W
john:1000:john

where you get from arch this: john:1000

That’s a puzzle. Question: are the users user1 and user2 legit, normal-in-every-way, Linux users on the Arch server (I think the answer is a “yes” but, just to be sure, I ask).

Also, because “john:1000” looks so odd, as root I would run this again for user1 and user2: smbpasswd -a user1 (and then smbpasswd -a user2) (but only after I had changed the line “security = user” and restarted samba [or rebooted]).

That would clarify some things, then we would look at other things.

It was in fact that line you identified in my global stanza that was causing my problem. I switched the setting to “security = user” and samba is back to giving me no problems. The line must have been changed somewhere in the transition.

The users, as you have probably guessed by the fact that my problem was solved, are in fact fullly privileged linux users. I did double check to re-add the users as root using smbpasswd -a [user], and ran the pdbedit -L -W again, and the output was quite the same. There must be some slight difference in the versions of samba run by SUSE or Ubuntu compared to Arch (one can only assume).

Anyhow, thank you for once again helping me solve my samba problems. After every hitch I come away with a slightly better understanding of the protocol. This topic is solved!

On 06/23/2012 09:36 AM, OakRaider4Life wrote:
>
> It was in fact that line you identified in my global stanza that was
> causing my problem. I switched the setting to “security = user” and
> samba is back to giving me no problems. The line must have been changed
> somewhere in the transition.
>
> The users, as you have probably guessed by the fact that my problem was
> solved, are in fact fullly privileged linux users. I did double check to
> re-add the users as root using smbpasswd -a [user], and ran the pdbedit
> -L -W again, and the output was quite the same. There must be some
> slight difference in the versions of samba run by SUSE or Ubuntu
> compared to Arch (one can only assume).
>
> Anyhow, thank you for once again helping me solve my samba problems.
> After every hitch I come away with a slightly better understanding of
> the protocol. This topic is solved!
>
>

Glad for you… :slight_smile:


Regards
swerdna