The container is not important. Do you have specified the correct server name? What’s the local path of the share? You may find some hints in /var/log/univention/listener.log on the member server.
After a long time (years), I had to create a few new shares. Currently UCS 4.4-2 errata 322. And I also find shares not creating correctly. I might have missed some important information. However, a new new share created: smb-documens , whatever owner/group is selected, it defaults to: root: Domain User.
My /var/log/univention/listener.log returns:
16.10.19 06:25:56.532 DEBUG_INIT
16.10.19 06:25:56.542 LISTENER ( WARN ) : Notifier/LDAP server is a.nother.name:7389
16.10.19 06:25:56.543 LDAP ( PROCESS ) : connecting to ldap://a.nother.name:7389
16.10.19 06:25:56.553 LISTENER ( ERROR ) : failed to connect to any notifier
16.10.19 06:25:56.554 LISTENER ( WARN ) : can not connect any server, retrying in 30 seconds
16.10.19 06:26:26.554 LISTENER ( WARN ) : Notifier/LDAP server is a.nother.name:7389
16.10.19 06:26:26.554 LDAP ( PROCESS ) : connecting to ldap://a.nother.name:7389
16.10.19 06:26:28.460 LISTENER ( ERROR ) : import of filename=/usr/lib/univention-directory-listener/system/samba4-idmap.py failed
Traceback (most recent call last):
File "/usr/lib/univention-directory-listener/system/samba4-idmap.py", line 57, in <module>
lp.load('/etc/samba/smb.conf')
RuntimeError: Unable to load file /etc/samba/smb.conf
16.10.19 06:26:28.460 LISTENER ( ERROR ) : import of filename=/usr/lib/univention-directory-listener/system/samba4-idmap.py failed in module_import()
UNIVENTION_DEBUG_BEGIN : uldap.__open host=a.nother.name port=7389 base=dc=nother,dc=name
UNIVENTION_DEBUG_END : uldap.__open host=a.nother.name port=7389 base=dc=nother,dc=name
16.10.19 06:45:05.327 LISTENER ( WARN ) : received signal 15
16.10.19 06:48:23.042 DEBUG_INIT
16.10.19 06:48:23.069 LISTENER ( WARN ) : Notifier/LDAP server is a.nother.name:7389
16.10.19 06:48:23.069 LDAP ( PROCESS ) : connecting to ldap://a.nother.name:7389
16.10.19 06:48:23.079 LISTENER ( ERROR ) : failed to connect to any notifier
16.10.19 06:48:23.079 LISTENER ( WARN ) : can not connect any server, retrying in 30 seconds
16.10.19 06:48:53.080 LISTENER ( WARN ) : Notifier/LDAP server is a.nother.name:7389
16.10.19 06:48:53.080 LDAP ( PROCESS ) : connecting to ldap://a.nother.name:7389
16.10.19 06:48:57.401 LISTENER ( ERROR ) : import of filename=/usr/lib/univention-directory-listener/system/samba4-idmap.py failed
Traceback (most recent call last):
File "/usr/lib/univention-directory-listener/system/samba4-idmap.py", line 57, in <module>
lp.load('/etc/samba/smb.conf')
RuntimeError: Unable to load file /etc/samba/smb.conf
16.10.19 06:48:57.401 LISTENER ( ERROR ) : import of filename=/usr/lib/univention-directory-listener/system/samba4-idmap.py failed in module_import()
UNIVENTION_DEBUG_BEGIN : uldap.__open host=a.nother.name port=7389 base=dc=nother,dc=name
UNIVENTION_DEBUG_END : uldap.__open host=a.nother.name port=7389 base=dc=nother,dc=name
16.10.19 10:48:03.063 LISTENER ( WARN ) : received signal 15
16.10.19 10:48:09.948 DEBUG_INIT
16.10.19 10:48:09.957 LISTENER ( WARN ) : Notifier/LDAP server is a.nother.name:7389
16.10.19 10:48:09.957 LDAP ( PROCESS ) : connecting to ldap://a.nother.name:7389
There are also no config files in /etc/samba/shares.conf.d# created. The share module for this share, still returns the chosen selection. I did not notice any upgrade/update errors so far in the past years.
new share name: smb-documents location: /home/smb-documents
I made a few tests in the meantime and it seems the problem has to do with the ACL’s from the generating directory.
If I created a new share on a memberserver in the directory “/var/www”, the share is created (as IT-Bizz mentioned) with root: Domain User (where Domain User is here nogroup).
In this case no entries created in /etc/samba/shares.conf.
If a share is created as a subdir of a new dir (e.g. “/newdir/newshare”) the main dir “/newdir” get´s wrong group type --> nogroup instead of the group from the config dialog in DC. The “newshare” dir is correct.
But never under “/var” or /var/www", although the ACL’s are identical to those of e.g. “/ opt”; actually no idear why.
Last but not least: a directory share is never deleted on the memberserver. Also not when it is empty, never used and the checkbox “Delete associated items” is checked. The entries in the config-files are deleted.
This doesn’t sound good. Is Sabma really installed on that machine? Please check with dpkg -l univention-samba4 which should show a line starting with ii univention-samba4 …
Next let UCS re-create all managed config files from their templates & tell the directory listener to re-run the Samba listener module:
This is most likely a result of the prior error: the directory listener module for Samba cannot be loaded because smb.conf isn’t found, and therefore it won’t handle share creation/modification events. The commands above might already fix this.
Please see this post about creating Samba shares in /var. Yes, that post is in German; if you don’t understand it, I’ll be happy to translate it into English.
Edit: oops, removed my note about old threads. I somehow read “8 days” as “8 years”. Sorry about that.
~# univention-directory-listener-ctrl resync samba-shares
waiting for listener modules to finish
waiting for listener modules to finish
waiting for listener modules to finish
waiting for listener modules to finish
waiting for listener modules to finish
waiting for listener modules to finish
listener shutdown done
~# univention-directory-listener-ctrl resync samba-shares
waiting for listener modules to finish
waiting for listener modules to finish
waiting for listener modules to finish
waiting for listener modules to finish
waiting for listener modules to finish
waiting for listener modules to finish
listener shutdown done
This didn’t change, even after a reboot
Also with the two options, from the older topic, ucr set listener, no changes in output, however, now all config files from /etc/samba/shares.conf.d are gone, just deleted.
a new share created: again, the folder only created with root:Domain Users
and here my listener log:
GNU nano 2.7.4 File: /var/log/univention/listener.log
20.10.19 07:41:35.830 LISTENER ( ERROR ) : failed to connect to any notifier
20.10.19 07:41:35.830 LISTENER ( WARN ) : can not connect any server, retrying in 30 seconds
20.10.19 07:42:05.831 LISTENER ( WARN ) : Notifier/LDAP server is a.nother.server:7389
20.10.19 07:42:05.831 LDAP ( PROCESS ) : connecting to ldap://a.nother.server:7389
20.10.19 07:42:22.913 LISTENER ( ERROR ) : import of filename=/usr/lib/univention-directory-listener/system/samba4-idmap.$
Traceback (most recent call last):
File "/usr/lib/univention-directory-listener/system/samba4-idmap.py", line 57, in <module>
lp.load('/etc/samba/smb.conf')
RuntimeError: Unable to load file /etc/samba/smb.conf
20.10.19 07:42:22.914 LISTENER ( ERROR ) : import of filename=/usr/lib/univention-directory-listener/system/samba4-idmap.$
UNIVENTION_DEBUG_BEGIN : uldap.__open host=a.nother.server port=7389 base=dc=nother,dc=server
UNIVENTION_DEBUG_END : uldap.__open host=a.nother.server port=7389 base=dc=nother,dc=server
20.10.19 13:00:14.752 LISTENER ( WARN ) : received signal 15
21.10.19 07:41:36.450 DEBUG_INIT
21.10.19 07:41:36.471 LISTENER ( WARN ) : Notifier/LDAP server is a.nother.server:7389
21.10.19 07:41:36.471 LDAP ( PROCESS ) : connecting to ldap://a.nother.server:7389
21.10.19 07:41:36.482 LISTENER ( ERROR ) : failed to connect to any notifier
21.10.19 07:41:36.482 LISTENER ( WARN ) : can not connect any server, retrying in 30 seconds
21.10.19 07:42:06.483 LISTENER ( WARN ) : Notifier/LDAP server is a.nother.server:7389
21.10.19 07:42:06.483 LDAP ( PROCESS ) : connecting to ldap://a.nother.server:7389
21.10.19 07:42:23.051 LISTENER ( ERROR ) : import of filename=/usr/lib/univention-directory-listener/system/samba4-idmap.$
Traceback (most recent call last):
File "/usr/lib/univention-directory-listener/system/samba4-idmap.py", line 57, in <module>
lp.load('/etc/samba/smb.conf')
RuntimeError: Unable to load file /etc/samba/smb.conf
21.10.19 07:42:23.051 LISTENER ( ERROR ) : import of filename=/usr/lib/univention-directory-listener/system/samba4-idmap.$
UNIVENTION_DEBUG_BEGIN : uldap.__open host=a.nother.server port=7389 base=dc=nother,dc=server
UNIVENTION_DEBUG_END : uldap.__open host=a.nother.server port=7389 base=dc=nother,dc=server
21.10.19 13:00:14.685 LISTENER ( WARN ) : received signal 15
22.10.19 07:41:37.846 DEBUG_INIT
PS: language is no problem, I speak German/English same as native
28.10.19 14:05:01.571 LISTENER ( ERROR ) : samba-shares: rename/create of sharePath for cn=alien,cn=shares,dc=nother,dc=server failed (WARNING: the path '/home-cesar/alien' for the share 'alien' matches a blacklisted path. The whitelist can be extended via the UCR variables listener/shares/whitelist/.)
All of your shares are on paths that are blacklisted. This is the same issue I was talking about in the post I linked to earlier. You can follow the recommendation in it (= setting certain UCR variables which will whitelist your share locations).
ok, I have tried and tested now:
1- I did add my line via cli ucr set ‘listener/shares/whitelist/var=/home-*’ , it appears as whitelisted location in the Univention Configuration Registry
2- univention-directory-listener-ctrl resync samba-shares
3- created a new test share in my usual (/home-cesar/test)
4- no config file in /etc/samba/shares.conf.d# created
5- owner and group owner in the settings are NOT applied to the directory, just defaulted back to root:Domain Users with 755
The same, as before. The blacklist seems to me not the cause
I am now a bit further, hope it helps
I did add :/home- to the default directories, univention-directory-listener-ctrl resync samba-shares and systemctl restart smbd nmbd
This created the actual folder correctly as set with owner: group
Still missing are the config files in /etc/samba/shares.conf.d#
Yeah, seems like the listener module’s code won’t re-create the file unless something in the share’s configuration is changed. You’ll have to edit each share, change anything in it, save, change it back.
Finally, the adding of my path: /home-* did succeed. All the config files are also back again (yes, they where gone) in /etc/samba/shares.conf.d ALL back now and working for me again.