How to properly create a network fileshare on RHEL 8.5


New Member
Jun 28, 2023
Reaction score
Hello everyone,
and thanks for letting me join the forum.
I would like to ask for help regarding one particular problem. I need to create a fileshare on RHEL so that it is accessible on Windows Server 2016 environment.
From what I understand I have 2 basic options - either create a SMB share, or NFS share.
At first I created a SMB share, made sure the local/network FW allows the connection, and attempted to map the network drive from windows - win server OS was able to contact the share, and asked for credentials, but thats where I ended - I need to use my domain account to access the share, but I just wont acccept my domain credentials.
Can you please advise how to modify the smb.conf file so I am able to access the share remotely with domain account?
So far it looks like this (latest change that I did was according to following article:

realm = <AD domain suffix>
netbios name = <hostname of this RHEL>
password server = <IP of domain controller>
preferred master = no
domain master = no
security = user
kerberos method = secrets and keytab
client use spnego principal = true
server signing = mandatory
client ntlmv2 auth = yes
client use spnego = yes
template shell = /bin/bash
winbind use default domain = Yes
winbind enum users = No
winbind enum groups = No
winbind nested groups = Yes
idmap cache time = 0
idmap config * : backend = tdb
idmap config * : range = 1000 - 200000000
idmap config * : base_tdb = 0
enable core files = false
passdb backend = tdbsam

printing = cups
printcap name = cups
load printers = yes
cups options = raw

# Install samba-usershares package for support
include = /etc/samba/usershares.conf

comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes

comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No

comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @printadmin root
force group = @printadmin
create mask = 0664
directory mask = 0775

browsable = yes
path = /SHARE/<share_name>
writable = yes
guest ok = yes
hosts allow = <IP of the windows 2016 server>
valid users = <domain\user>

As for the second option, NFS share, I followed this article in order to set it up properly (, but when I check the status of nfs-server.service, I get this:

[<user>@<server> etc]$ systemctl status nfs-server
● nfs-server.service - NFS server and services
Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2023-06-28 13:33:10 CEST; 13min ago
Main PID: 373614 (code=exited, status=1/FAILURE)

Can anyone advise on how to troubleshooti either of those methods? Or maybe recommend which one to pursue further? I will provide any logs you may need, I just dont know what exactly to show you at this point.

Many thanks for any reply,
Tomas C.

Members online