LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-07-2021, 04:11 AM   #1
n00b_noob
Member
 
Registered: Sep 2020
Posts: 436

Rep: Reputation: Disabled
Post Why I can't browse my Samba share?


Hello,
I'm setting up a Samba DC on the Fedora Server 33 and joined a Windows client to my domain.
I want to create a share that just accessible for specific users.
I have a "login" group with below members:
Code:
# groupmems -l -g login
user2  user3
Then I created a "share directory as below:
Code:
# mkdir share
# chmod -R 0770 share/
# chown -R :login share/
# chcon -t samba_share_t /home/share/
After it, I added below lines to my "smb.conf" file:
Code:
[Secure]
path = /home/share
valid users = @login
guest ok = no
writable = yes
browsable = yes
Then restarted my Samba service and did:
Code:
# testparm 
Load smb config files from /usr/local/samba/etc/smb.conf
Loaded services file OK.
Weak crypto is allowed
Server role: ROLE_ACTIVE_DIRECTORY_DC

Press enter to see a dump of your service definitions

# Global parameters
[global]
	bind interfaces only = Yes
	dns forwarder = 8.8.8.8
	interfaces = lo enp0s17
	passdb backend = samba_dsdb
	realm = MYDOMAIN.Z
	server role = active directory domain controller
	workgroup = MYDOMAIN
	rpc_server:tcpip = no
	rpc_daemon:spoolssd = embedded
	rpc_server:spoolss = embedded
	rpc_server:winreg = embedded
	rpc_server:ntsvcs = embedded
	rpc_server:eventlog = embedded
	rpc_server:srvsvc = embedded
	rpc_server:svcctl = embedded
	rpc_server:default = external
	winbindd:use external pipes = true
	idmap_ldb:use rfc2307 = yes
	idmap config * : backend = tdb
	map archive = No
	vfs objects = dfs_samba4 acl_xattr


[sysvol]
	path = /usr/local/samba/var/locks/sysvol
	read only = No


[netlogon]
	path = /usr/local/samba/var/locks/sysvol/mydomain.z/scripts
	read only = No


[Secure]
	path = /home/share
	read only = No
	valid users = @login
On Windows client, when I want to open my share then it shows me below window and don't accept my username and password:

Click image for larger version

Name:	Windows2.png
Views:	50
Size:	31.0 KB
ID:	36324

Why? Which part of my configuration is wrong?

Thank you.

Last edited by n00b_noob; 05-07-2021 at 04:14 AM.
 
Old 05-07-2021, 06:43 AM   #2
rpenny
Member
 
Registered: Jul 2019
Posts: 82

Rep: Reputation: Disabled
Hi Jason, you cannot use 'valid users' on a Samba AD DC. Can I suggest you read the Samba wiki, especially this part: https://wiki.samba.org/index.php/Set..._a_File_Server

you also do not use testparm on a Samba AD DC, you use 'samba-tool testparm' instead.
 
2 members found this post helpful.
Old 05-07-2021, 08:00 AM   #3
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by n00b_noob View Post
Hello,
I'm setting up a Samba DC on the Fedora Server 33 and joined a Windows client to my domain.
I want to create a share that just accessible for specific users.
I have a "login" group with below members:
Code:
# groupmems -l -g login
user2  user3
Then I created a "share directory as below:
Code:
# mkdir share
# chmod -R 0770 share/
# chown -R :login share/
# chcon -t samba_share_t /home/share/
After it, I added below lines to my "smb.conf" file:
Code:
[Secure]
path = /home/share
valid users = @login
guest ok = no
writable = yes
browsable = yes
Then restarted my Samba service and did:
Code:
# testparm 
Load smb config files from /usr/local/samba/etc/smb.conf
Loaded services file OK.
Weak crypto is allowed
Server role: ROLE_ACTIVE_DIRECTORY_DC

Press enter to see a dump of your service definitions

# Global parameters
[global]
	bind interfaces only = Yes
	dns forwarder = 8.8.8.8
	interfaces = lo enp0s17
	passdb backend = samba_dsdb
	realm = MYDOMAIN.Z
	server role = active directory domain controller
	workgroup = MYDOMAIN
	rpc_server:tcpip = no
	rpc_daemon:spoolssd = embedded
	rpc_server:spoolss = embedded
	rpc_server:winreg = embedded
	rpc_server:ntsvcs = embedded
	rpc_server:eventlog = embedded
	rpc_server:srvsvc = embedded
	rpc_server:svcctl = embedded
	rpc_server:default = external
	winbindd:use external pipes = true
	idmap_ldb:use rfc2307 = yes
	idmap config * : backend = tdb
	map archive = No
	vfs objects = dfs_samba4 acl_xattr


[sysvol]
	path = /usr/local/samba/var/locks/sysvol
	read only = No


[netlogon]
	path = /usr/local/samba/var/locks/sysvol/mydomain.z/scripts
	read only = No


[Secure]
	path = /home/share
	read only = No
	valid users = @login
On Windows client, when I want to open my share then it shows me below window and don't accept my username and password:

Attachment 36324

Why? Which part of my configuration is wrong?

Thank you.
Take a look at your samba logs? Set appropriate log level: https://wiki.samba.org/index.php/Set...amba_Log_Level
 
Old 05-08-2021, 06:18 AM   #4
n00b_noob
Member
 
Registered: Sep 2020
Posts: 436

Original Poster
Rep: Reputation: Disabled
Post

Quote:
Originally Posted by rpenny View Post
Hi Jason, you cannot use 'valid users' on a Samba AD DC. Can I suggest you read the Samba wiki, especially this part: https://wiki.samba.org/index.php/Set..._a_File_Server

you also do not use testparm on a Samba AD DC, you use 'samba-tool testparm' instead.
Thank you.
My users and groups are:
Code:
# wbinfo -u
MYDOMAIN\administrator
MYDOMAIN\guest
MYDOMAIN\krbtgt
MYDOMAIN\user1
MYDOMAIN\user2
MYDOMAIN\user3
MYDOMAIN\user4
MYDOMAIN\user5
#
# wbinfo -g
MYDOMAIN\cert publishers
MYDOMAIN\ras and ias servers
MYDOMAIN\allowed rodc password replication group
MYDOMAIN\denied rodc password replication group
MYDOMAIN\dnsadmins
MYDOMAIN\enterprise read-only domain controllers
MYDOMAIN\domain admins
MYDOMAIN\domain users
MYDOMAIN\domain guests
MYDOMAIN\domain computers
MYDOMAIN\domain controllers
MYDOMAIN\schema admins
MYDOMAIN\enterprise admins
MYDOMAIN\group policy creator owners
MYDOMAIN\read-only domain controllers
MYDOMAIN\dnsupdateproxy
MYDOMAIN\login2
And "login2" group members are:
Code:
# samba-tool group listmembers login2
user4
user5
According to the https://wiki.samba.org/index.php/Set...g_Windows_ACLs tutorial, I tried to create a share, but I got below error:
Code:
# mkdir -p share
# chown root:"login2" share/
chown: invalid group: ‘root:login2’
# chown root:"Domain Admins" share/
chown: invalid group: ‘root:Domain Admins’
Why?
 
Old 05-08-2021, 06:12 PM   #5
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by n00b_noob View Post
According to the https://wiki.samba.org/index.php/Set...g_Windows_ACLs tutorial, I tried to create a share, but I got below error:
Code:
# mkdir -p share
# chown root:"login2" share/
chown: invalid group: ‘root:login2’
# chown root:"Domain Admins" share/
chown: invalid group: ‘root:Domain Admins’
Why?
okay, you are going to have to be more specific... what exactly are you asking?
As for the error, it tells you what's wrong.
 
Old 05-09-2021, 12:45 AM   #6
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by n00b_noob View Post
My users and groups are:
Code:
# wbinfo -u...
# wbinfo -g
...
And "login2" group members are:
Code:
# samba-tool group listmembers login2
user4
user5
According to the https://wiki.samba.org/index.php/Set...g_Windows_ACLs tutorial, I tried to create a share, but I got below error:
Code:
# mkdir -p share
# chown root:"login2" share/
chown: invalid group: ‘root:login2’
# chown root:"Domain Admins" share/
chown: invalid group: ‘root:Domain Admins’
Why?
Because chown expects groups to be listed in /etc/groups. It has no knowledge of Windows groups.
 
1 members found this post helpful.
Old 05-14-2021, 09:24 AM   #7
n00b_noob
Member
 
Registered: Sep 2020
Posts: 436

Original Poster
Rep: Reputation: Disabled
Thank you.
Problem solved with configuration "Winbindd" service.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba: Can access share from UNC but can't browse to it. yknivag Linux - Server 2 08-25-2016 05:56 AM
One XP machine can browse to the Samba share, one cannot jim0112 Linux - Software 9 02-09-2007 04:29 PM
Samba - dont have permission to browse samba share. Scrag Linux - Software 4 11-28-2006 01:42 AM
Process dies when i try to browse mounted SAMBA windows share poko Linux - Software 1 08-12-2004 11:40 PM
unable to browse samba share from windows 2003 kfloda Linux - Software 1 08-16-2003 07:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration