[Samba] Custom user shares

Marc Muehlfeld mmuehlfeld at samba.org
Tue Apr 22 11:56:34 MDT 2014


Hello Ashley,

Am 22.04.2014 19:45, schrieb Ashley M. Kirchner:
> We have an old internal server running samba version 3.2.15 which can't be
> upgraded for different reasons. It's been running several passwordless
> shares with no problem. Now I'm trying to configure passworded user shares
> and not having much luck. I'm wondering if someone can help me diagnose
> this:
>
> In smb.conf I have
>
> security = user
> map to guest = Bad user
> ...
> username map = /etc/samba/usermap.txt
>
> The public shares are setup as follows:
> [bda]
>          comment = BDA Files
>          browseable = yes
>          writable = yes
>          path = /opt/bda
>          guest ok = yes
>          public = yes
>          read only = no
>          force user = nobody
>          force group = nobody
>          create mask = 0777
>          directory mask = 0777
>          locking = no
>
> *This all works.*
>
> Now for the user shares, I have this:
> [kirash]
>          path = /opt/backup/kirash
>          comment = Ashley M. Kirchner
>          writable = yes
>          valid users = kirash
>
> The unix user 'kirash' exists.
> usermap.txt has a line in it that maps the user as follows:
> kirash = AshleyMKirchner
>
> But when I try to access that share from my client I get access denied.
>
> Interestingly enough, I have a second samba server with a more recent
> version, 3.6.9 to be exact, with the same exact samba configuration and
> that DOES WORK. I can access the share, it asks for the user credentials
> (as set on that unix server) and I'm able to log in and access that share
> just fine.
>
> So what am I missing on the older server that's causing it to deny access?
>
> Note: our network does NOT use any kind of directory or other server log
> ins. Each client is on their own.


You said the user is existing in unix. But is it also existing in the 
samba database? As you haven't posted the complete smb.conf, I guess you 
use tdb. Then have a look at 'smbpasswd' (-e / -a). If Samba uses a 
different backend, please provide some more details.


Regards,
Marc




More information about the samba mailing list