Bug 1908506

Summary: smbclient command shows an error "gencache_init: Failed to create directory: /home/username/.cache/samba - No such file or directory" on accessing samba share when executed by non-privileged user
Product: Red Hat Enterprise Linux 8 Reporter: Akshay Sakure <asakure>
Component: sambaAssignee: Andreas Schneider <asn>
Status: CLOSED ERRATA QA Contact: sssd-qe <sssd-qe>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.5CC: asn, dkarpele, gdeschner, jarrpa, thalman
Target Milestone: rcKeywords: Triaged
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: samba-4.14.4-4.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-09 19:47:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Akshay Sakure 2020-12-16 21:39:52 UTC
- Description of problem:
smbclient command shows an error "gencache_init: Failed to create directory: /home/username/.cache/samba - No such file or directory" on accessing samba share when executed by non-privileged user

- Version-Release number of selected component (if applicable):
samba-4.10.16-9.el7_9.x86_64

- How reproducible:
Always.

- Steps to Reproduce:
1. Create a share on Windows AD server.
2. Join a system to AD domain via realmd (samba + winbind)
3. Try to access the share hosted on Windows system via smbclient

- Actual results:
'smbclient' command shows an error/warning while accessing the share as non-privileged user e.g. local linux user. 
---
gencache_init: Failed to create directory: /home/localuser1/.cache/samba - No such file or directory
---

- Expected results:
'smbclient' command shouldn't throw any error while accessing the share as non-privileged user. 

- Additional info:
This error doesn't occurs for "root" user. 
The error is not seen if you manually create '.cache/samba' directory under user's home-directory.

This looks like a regression to https://bugzilla.redhat.com/show_bug.cgi?id=1831986 which was fixed in samba-4.10.16-5.el7

Comment 3 Andreas Schneider 2020-12-21 08:43:09 UTC
Workaround: 'mkdir ~/.cache'

Comment 10 errata-xmlrpc 2021-11-09 19:47:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (samba bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:4438