Samba share issuse

i there i have been trying to get windows 10 to accesses my share folder on a Manjaro KDE samba 4.12.3 and i keep geting the following error

the specefied network password is not correct .

this is my smb.conf file

[global]

workgroup = workgroup
security = user
server role = standalone server
server min protocol = SMB2_10
client min protocol = SMB2
client max protocol = SMB3

[test share]
path = /home/omar/testsh
valid users = %s
browsable = no
read only = no

folder permission is
drwxrwxr-x 2 omar sambashare 4096 Sep 18 17:55 testsh

and there is no errors in testpram
and samba is running .

on the microsoft side i am runing windows 10 with smb 1 disabled

Welcome to Manjaro.

Since you created a non-public share, you have to explicitly set up samba users: Samba - ArchWiki

Simple tutorial for a public shares is availble here:

thank you for the quick response i wanted to create a share that is only accessible by the people i add in the samba share at the moment i have added my self.

thank to all of you i have finally understood that i needed to add the user to samba share .

and after adding the user to samba i am now getting closer to resolving the issue now i am getting the following error

My smb.conf

[global]

workgroup = workgroup
security = user
server role = standalone server
server string = lsys
log file = /var/log/samba/log.%m
max log size = 50
server min protocol = SMB2_10
client min protocol = SMB2
client max protocol = SMB3

[test share]
path = /home/omar/testsh
valid users = %s
browsable = no
read only = no

omar]# smbpasswd -a omar
New SMB password:
Retype new SMB password:
Added user omar.

omar# pdbedit -L -v

Unix username: omar
NT username:
Account Flags: [U ]
User SID: S-1-5-21-2294702106-1273291796-3023931694-1000
Primary Group SID: S-1-5-21-2294702106-1273291796-3023931694-513
Full Name: omar
Home Directory: \xxxxxx\omar
HomeDir Drive:
Logon Script:
Profile Path: \xxxx\omar\profile
Domain: PROBOOK
Account desc:
Workstations:
Munged dial:
Logon time: 0
Logoff time: Wed, 06 Feb 2036 16:06:39 CET
Kickoff time: Wed, 06 Feb 2036 16:06:39 CET
Password last set: Sat, 19 Sep 2020 22:34:38 CEST
Password can change: Sat, 19 Sep 2020 22:34:38 CEST
Password must change: never
Last bad password : 0
Bad password count : 0
Logon hours : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

sudo usermod -a -G sambashare omar

drwxrwxr-x 2 omar sambashare 4096 Sep 18 17:55

should omar be replaced by root

so that it should show as it is going through the home folder?

drwxrwxr-x 2 root sambashare

and i am not sure what i am missing .

thank you again an looking forward to your response.

At a first glance, this seems like a Windows security discrepancy:

Please read up on how to set up Windows Shares because this doesn’t look like a Manjaro problem.
You need to know how Windows shares work on Windows before trying to set up Samba shares on Linux.

Also, in the future, when providing code/output, please copy-paste it in-between 3 backticks ``` at the beginning and end of the code/text so that the output looks like this:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

instead of like this:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

(as that makes our life much easier so you get helped more quickly and efficiently)

:innocent:

hi thank you for your comments i have no problem accessing windows shares from my linux pc it only the other way from my windows 10 pc is unable to accesss my linux share .

thank you for all the advice and tips

best regard
omar

  1. Are usernames and passwords identical on both Windows and Linux?
  2. Omar is in domain PROBOOK, but the samba share only works for users in workgroup workgroup . Please correct one of the two.
  3. NT username is empty. Please correct that. That one shouldn’t matter, Sorry
  4. On which FS are you running? EXT4? NTFS?
  5. Please press the pencil icon under your previous post and edit it as requested as the output is hard to read now.
  6. No
  7. Please explain: no clue what you’re talking about…

:innocent:

1 Like

Hi Fabby

  1. yes i did try creating the same user name and password on both
  2. probook is the host name for the laptop.
  3. i am running ext4 on the linux
  4. i read that if i was going through the home folder i needed it to have
    root permission.

currently i have drwxrwxr-x 2 omar sambashare for the share folder
and was wandering if i need to change to
drwxrwxr-x 2 root sambashare

thank again and look forward to hearing from you

best regard
omar

Create a local user on your Manjaro system - the user you wish to use from Windows to access the share on Manjaro.

Then add this user to the sam database

smbpasswd -a username

There is a wealth of info available e.g. troubleshooting samba issues

1 Like

fter i looked at the logs i have notced the following error

2020/09/19 15:13:30.289227, 0]…/…/source3/smbd/service.c:180(chdir_current_service)

chdir_current_service: vfs_ChDir(/home/omar/public) failed: Permission denied. Current token: uid=65534, gid=65534, 1 groups: 65534

i then serched the internet i notice the following artical

Re: Samba UID GID error

i.e
/etc/group
nogroup:*:-2

/etc/passwd
nobody:*:-1:-2:Guest Account:/:

i then looked at the above files to discover i had the following lines

/etc/group
nobody:x:65534:
/etc/passwd
nobody:x:65534:65534:Nobody:/:/usr/bin/nologin

can i remove these lines and will it solve the problem

i am sorry i am very new to Linux
thanks again for all your time and efforts
best regard omar

after alot of digging i have been able to elevate log level = 2 and have now got the following error in the logs it seems its still trying to use samba 1 as it using port 445

[global]

WORKGROUP = workgroup
security = user
#map to guest = bad user
server role = standalone server
server string = laptop %v
netbios name = probook
log file = /var/log/samba/log%U.log
max log size = 100
log level = 2
server min protocol = SMB2_10
server max protocol = SMB3
client min protocol = SMB2
client max protocol = SMB3
security = user

[homes]
comment = Home Directories
valid users = @sambashare
browseable = yes
read only = No

[share]
comment = share for all users
path = /home/omar/share/
available = yes
valid users = @sambashare
browsable = yes
writable = yes
read only = no
guest ok = no

drwxrwx— 3 omar sambashare 4096 Oct 6 13:42 share

[NTLMv1] status [NT_STATUS_WRONG_PASSWORD] workstation [DELL-PC] remote host [ipv4:10.0.0.105:59205] mapped to [DELL-PC][omar]. local host [ipv4:10.0.0.16:445]
{“timestamp”: “2020-10-19T03:18:50.287446+0200”, “type”: “Authentication”, “Authentication”: {“version”: {“major”: 1, “minor”: 2}, “eventId”: 4625, “logonId”: “0”, “logonType”: 3, “status”: “NT_STATUS_WRONG_PASSWORD”, “localAddress”: “ipv4:10.0.0.16:445”, “remoteAddress”: “ipv4:10.0.0.105:59205”, “serviceDescription”: “SMB2”, “authDescription”: null, “clientDomain”: “DELL-PC”, “clientAccount”: “omar”, “workstation”: “DELL-PC”, “becameAccount”: null, “becameDomain”: null, “becameSid”: null, “mappedAccount”: “omar”, “mappedDomain”: “DELL-PC”, “netlogonComputer”: null, “netlogonTrustAccount”: null, “netlogonNegotiateFlags”: “0x00000000”, “netlogonSecureChannelType”: 0, “netlogonTrustAccountSid”: null, “passwordType”: “NTLMv1”, “duration”: 4228}}

i have added the folloowing line in smb.conf
ntlm auth = yes and it workes but it is not secure so i would like to set it to ntlmv2

log results

Processing section “[share]”
[2020/10/19 03:41:05.910581, 2] …/…/source3/auth/auth.c:323(auth_check_ntlm_password)
check_ntlm_password: authentication for user [omar] -> [omar] -> [omar] succeeded
[2020/10/19 03:41:08.259941, 0] …/…/source3/nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)

hope this helps and thank you for all help
best regards
omar