Bug 49598 - Wrong Interface Name Written To smb.conf
Wrong Interface Name Written To smb.conf
Status: NEW
Product: UCS
Classification: Unclassified
Component: univention-base-files
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-06-05 16:25 CEST by Christian Völker
Modified: 2019-06-05 16:26 CEST (History)
0 users

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.091
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2019060321000294
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 Christian Völker univentionstaff 2019-06-05 16:25:25 CEST
Steps to reproduce:

ucr unset samba/interfaces/bindonly
ucr unset samba/interfaces

Edit Interfaces in UMC in a way to add a second IP to the same physical NIC. Will result in:
=========================================
interfaces/ens192/address: 10.250.200.101
interfaces/ens192/broadcast: 10.250.200.255
interfaces/ens192/ipv6/acceptRA: false
interfaces/ens192/netmask: 24
interfaces/ens192/network: 10.250.200.0
interfaces/ens192/start: true
interfaces/ens192/type: static
interfaces/ens192_0/address: 10.250.200.201
interfaces/ens192_0/netmask: 255.255.255.0
=========================================
The ucr commit will create smb.conf with the following entries:
=========================================
root@backup:/etc/samba# grep interface smb.conf
	# ignore interfaces in samba/register/exclude/interfaces
	bind interfaces only = yes
	interfaces = lo ens192 ens192_0
=========================================

According to above settings samba should listen to all IPs (lo, 200.101 and 200.201). But it does not:
=========================================
root@backup:/etc/samba# netstat -anp| grep ":88"
tcp        0      0 10.250.200.101:88       0.0.0.0:*               LISTEN      4260/samba: conn[kd 
tcp        0      0 127.0.0.1:88            0.0.0.0:*               LISTEN      4260/samba: conn[kd 
tcp6       0      0 ::1:88                  :::*                    LISTEN      4260/samba: conn[kd 
udp        0      0 10.250.200.101:88       0.0.0.0:*                           4260/samba: conn[kd 
udp        0      0 127.0.0.1:88            0.0.0.0:*                           4260/samba: conn[kd 
udp6       0      0 ::1:88                  :::*                                4260/samba: conn[kd 
=========================================


IP 201 (eth0:1) is missing because samba does not recon interface name "ens192_0" which should be "ens192:0" and therefore does not bind to the additional IP.
Comment 1 Christian Völker univentionstaff 2019-06-05 16:26:00 CEST
As a workaround you can set interfaces manually:

ucr set samba/interfaces/bindonly=yes
ucr set samba/interfaces="lo eth0 eth0:1"