Bug 31109 - univention-samba4.postinst: cannot stat `/var/lib/samba/ntp_signd': No such file or directory
univention-samba4.postinst: cannot stat `/var/lib/samba/ntp_signd': No such f...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Samba4
UCS 3.1
Other Linux
: P5 normal (vote)
: UCS 3.1-1-errata
Assigned To: Arvid Requate
Stefan Gohmann
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-19 11:33 CEST by Arvid Requate
Modified: 2013-06-19 14:34 CEST (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2013-04-19 11:33:32 CEST
During an in-place migration of samba3 to samba4 the actualise.log shows some error messages from the univention-samba4.postinst, indicating that the folder /var/lib/samba/ntp_signd is not (yet) present at that point:

=========================================================
Starting Univention iptables configuration::.
Create samba4/autostart
Multifile: /etc/samba/smb.conf
Setting windows/wins-support
Create samba/domain/master
Multifile: /etc/samba/smb.conf
stat: cannot stat `/var/lib/samba/ntp_signd': No such file or directory
fixing group ownership of /var/lib/samba/ntp_signd
chgrp: cannot access `/var/lib/samba/ntp_signd': No such file or directory
stat: cannot stat `/var/lib/samba/ntp_signd': No such file or directory
fixing group executable bit of /var/lib/samba/ntp_signd
chmod: cannot access `/var/lib/samba/ntp_signd': No such file or directory
Stopping NTP server: ntpd.
Starting NTP server: ntpd.
Restarting univention-directory-listener daemon.
ok: run: univention-directory-listener: (pid 4970) 0s, normally down
done.
WARNING: It is not possible to install a samba 4 domaincontroller 
         into a samba 3 environment. samba4/ignore/mixsetup is true.
         Continue as requested
Multifile: /etc/samba/smb.conf
=========================================================

We should fix this error message and ensure that finally that folder has +x for group "ntp".
Comment 1 Arvid Requate univentionstaff 2013-05-30 18:38:11 CEST
During tests with UCS@school 3.1 R2 the Samba4 backed NTP server again was not accepted by Windows clients. The issue is, that the socket directory is not accessable for the group "ntp":

root@master:~# ls -ld /var/lib/samba/ntp_signd
drwxr-x--- 2 root root 4096 29. Mai 17:14 /var/lib/samba/ntp_signd

This was thought to be fixed by Bug #29688, but apparently this only fixed things for updates, but not for new instalations, where the socket directory does not exist during the run of univention-samba4.postinst. The directory is created by the ntp_signd samba4 sub-process on the first start of samba4.

Either we pre-create it in univention-samba4.postinst or we copy the chgrp/chmod code from the postinst to the joinscript to run after initial join/provision.
Comment 2 Arvid Requate univentionstaff 2013-06-06 19:58:53 CEST
Once this is fixed, the workaround should be removed from 
http://wiki.univention.de/index.php?title=UCS@school_Samba_3_to_Samba_4_Migratio
Comment 3 Arvid Requate univentionstaff 2013-06-10 18:31:14 CEST
Fixed. Advisory: 2013-06-10-univention-samba4.yaml
Comment 4 Stefan Gohmann univentionstaff 2013-06-11 21:58:48 CEST
Samba does not start in UCS 3.2 (3.1-1 installed, updated to 3.2 and then system setup appliance):

[2013/06/11 15:12:34,  0] ../source4/smbd/server.c:484(binary_smbd_main)
  samba: using 'standard' process model
[2013/06/11 15:12:34,  0] ../lib/util/util.c:196(directory_create_or_exist)
  invalid permissions on directory '/var/lib/samba/ntp_signd': has 0755 should be 0750
[2013/06/11 15:12:34,  0] ../source4/smbd/service_task.c:35(task_server_terminate)
Comment 5 Arvid Requate univentionstaff 2013-06-12 12:53:15 CEST
Fixed, advisory updated.
Comment 6 Stefan Gohmann univentionstaff 2013-06-19 07:38:31 CEST
OK, I've added a simple test case:
 /usr/share/ucs-test/51_samba4/54ntp_permissions

I was able to reproduce it.

3.1-1-errata: OK

YAML: OK

3.2: OK (code comparison)

3.2 Changelog: Failed
Comment 7 Arvid Requate univentionstaff 2013-06-19 12:28:28 CEST
updated changelog-3.2.tex.
Comment 8 Stefan Gohmann univentionstaff 2013-06-19 12:28:56 CEST
OK
Comment 9 Janek Walkenhorst univentionstaff 2013-06-19 14:34:52 CEST
http://errata.univention.de/ucs/3.1/129.html