You are not logged in.

#1 2019-06-10 11:35:05

meetvora
Member
Registered: 2019-06-10
Posts: 3

Samba is ignoring "Valid Users"?

I have set up a minimal arch server for my workplace that shares a data partition with other windows computers.

In my samba share config I have added a "Valid Users" line, which allows only two users to access the share, but the share connects successfully from any windows computer regardless of the credentials. What's going wrong here?

Here's the share config:

[share]
comment = staff
path = /data/share
valid users = ry staff
public = no
writeable = yes
printable = no

Offline

#2 2019-06-10 12:03:31

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 1,317

Re: Samba is ignoring "Valid Users"?

post full testparm dump


ENTER

~ Arch is not Arch unless it is Arch ~
~ It’s better to be good at something, instead of mediocre at everything ~

Offline

#3 2019-06-12 05:30:43

meetvora
Member
Registered: 2019-06-10
Posts: 3

Re: Samba is ignoring "Valid Users"?

ugjka wrote:

post full testparm dump

Here's the result:

testparm /etc/samba/smb.conf
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
    dns proxy = No
    log file = /usr/local/samba/var/log.%m
    max log size = 50
    server role = standalone server
    server string = Samba Server
    workgroup = RXXXXXXXYXXXX
    idmap config * : backend = tdb


[homes]
    browseable = No
    comment = Home Directories
    read only = No


[printers]
    browseable = No
    comment = All Printers
    path = /usr/spool/samba
    printable = Yes


[share]
    comment = Staff
    path = /data/share
    read only = No
    valid users = ry staff

Offline

#4 2019-06-14 10:36:03

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 1,317

Re: Samba is ignoring "Valid Users"?

Add to your [share] "guest ok = No" and in your [global] add "map to guest = Bad User"

Also what's the output of "stat /data/share"?

Samba logs and journal logs would be nice in case there is something funky going on.

Last edited by ugjka (2019-06-14 10:37:42)


ENTER

~ Arch is not Arch unless it is Arch ~
~ It’s better to be good at something, instead of mediocre at everything ~

Offline

#5 Yesterday 03:06:30

meetvora
Member
Registered: 2019-06-10
Posts: 3

Re: Samba is ignoring "Valid Users"?

ugjka wrote:

Add to your [share] "guest ok = No" and in your [global] add "map to guest = Bad User"

Also what's the output of "stat /data/share"?

Samba logs and journal logs would be nice in case there is something funky going on.

Added guest ok = no and map to guest = Bad User to my samba config. There was still no change or improvement. Whenever I connect using windows it just seems to gain access successfully hmm how risky for a work computer.

Here's the output of stat /data/share
  File: /data/share
  Size: 8             Blocks: 0          IO Block: 4096   directory
Device: 31h/49d    Inode: 257         Links: 1
Access: (0775/drwxrwxr-x)  Uid: ( 1001/      ry)   Gid: ( 1001/      ry)
Access: 2019-06-10 16:10:38.201503007 +0530
Modify: 2019-06-02 09:58:02.603211703 +0530
Change: 2019-06-10 16:10:38.198169674 +0530
Birth: 2019-06-02 08:47:57.886615676 +0530

And finally, the samba logs
There's nothing significant in there.
A lot of errors: unable to open new log file '/usr/local/samba/var/log.%m': No such file or directory
and a few Request denies.
I could post them here in full if you think that would make it easier for you to help me out.

Offline

#6 Yesterday 13:15:48

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 1,317

Re: Samba is ignoring "Valid Users"?

Pretty mysterious bug, nothing seems wrong...

Can you post the output of "sudo pdbedit -L -v"

Did you setup passwords for your users using "sudo smbpasswd -a myuser"

I would encourage to post the full samba log, just for completion


ENTER

~ Arch is not Arch unless it is Arch ~
~ It’s better to be good at something, instead of mediocre at everything ~

Offline

#7 Yesterday 13:28:15

seth
Member
Registered: 2012-09-03
Posts: 11,260

Re: Samba is ignoring "Valid Users"?

To rule out the d'oh moment, you did restart the smb services after changing the config, did you?

Online

Board footer

Powered by FluxBB