RHEL8 samba: %U for include directive doesn't work for share listing
Issue
- RHEL8 samba: %U for include directive doesn't work for share listing
[Reproducer sample]
Server1(Samba Server):
adduser user1
mv /etc/samba/smb.conf /etc/samba/smb.conf.org
cat << 'EOF' > /etc/samba/smb.conf
[global]
workgroup = SAMBA
security = user
passdb backend = tdbsam
load printers = no
include = /etc/samba/%U.conf
EOF
cat << 'EOF' > /etc/samba/user1.conf
[user1-share]
path = /user1-share
writable = yes
browseable = yes
valid users = user1
EOF
mkdir /user1-share
smbpasswd -a user1
systemctl restart smb
Windows command prompt:
C:\> net use \\Server1\ipc$ /user:user1 <password>
C:\> net view \\Server1
Though user1-share should be showed, there are no entries in the list.
Environment
- Red Hat Enterprise Linux 8
- samba-4.16.4-2.el8
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.