[Samba] Ubuntu 20.04 setup

Gregory Sloop gregs at sloop.net
Mon Jul 13 23:03:14 UTC 2020

Sorry for the direct mail Louis - I intended to post to the list. I'll do that now.

Top posting...

Quick follow-up.
Louis - I might change my mind and use your repo.
Are the 20.04 packages built yet? 

If not, not a huge issue - but I thought I might try them.


LPHvBvs> Hai Greg, 

>> -----Oorspronkelijk bericht-----
>> Van: samba [mailto:samba-bounces at lists.samba.org] Namens 
>> Gregory Sloop via samba
>> Verzonden: donderdag 4 juni 2020 19:17
>> Aan: samba at lists.samba.org
>> Onderwerp: [Samba] Ubuntu 20.04 setup

>> Louis, et al. Hi!

>> So, I'm working on a 20.04 setup. 
>> I think I'll still use the distro version and not Louis' 
>> packages. [No offense Louis - I just need to be sure if 
>> (forbid) anything happens to Louis, his packages aren't going 
>> to be supported any more, and I'll be on my own for security 
>> updates etc. The 20.04 versions are pretty current, and I 
>> think will meet my needs for the life of the distro. If not, 
>> I can always re-evaluate that at the time.]

LPHvBvs> Ah, totaly understandable and i get that.  No worries ;-) 
LPHvBvs> So if i suddenly would get run over with a train, what then
LPHvBvs> Well, simple switch back to official packages, using these commands.

LPHvBvs> apt-get remove samba winbind samba-* --autoremove 
LPHvBvs> apt-get install samba winbind
LPHvBvs> And your done. ;-) 

LPHvBvs> You only miss spotlight support then. 

LPHvBvs> But im lucky, so far i dont see trains here ;-) 

>> So, is there anything new in 20.04 I need to be aware of vs 
>> 18.04? systemd.resolved seemed to be the biggest "gotcha" previously.
>> Anything else that's different in 20.04 I should be aware of?

LPHvBvs> You can still use that howto yes, i have a new base for 20.04 but not finished.
LPHvBvs> Cant post it yet. But after today i have 3 weeks vacation, i'll do some howto updating
LPHvBvs> Since i took the best weeks for vacation.. with rain.. :-( 
LPHvBvs> and not going anywhere, Its still to soon in my opinion for that. 

>> I'm planning on using the 18.04 walk-through you [Louis] did 
>> 18mo or so ago - with a few changes to meet my needs. (eg. 
>> I'm using internal DNS, not BIND9, etc.)

LPHvBvs> Well, on that part, if you switch to full systemd setup. 
LPHvBvs> what i personaly do like, you need to "correclty" remove/switch on ubuntu.
LPHvBvs> Or completly remove netplan and all crap that was added and
LPHvBvs> configure systemd-networkd manualy
LPHvBvs> Or use netplan to configure it and use 
LPHvBvs> https://websiteforstudents.com/how-to-setup-static-fixed-ip-on-ubuntu-20-04-18-04/
LPHvBvs> I just dont like netplan so i remove it, thats a choice. 

LPHvBvs> If you use multihoming/multiple interfaces. 
LPHvBvs> Dont configure : /etc/systemd/resolv.conf 

LPHvBvs> Configure DNS and routings withing the needed interface (
LPHvBvs> can be in mutiple files as look you watch the loading order. )
Eth0 (lan) ->> DNS samba 
Eth1 (wan) ->> DNS internet 

LPHvBvs> On AD-DC, use ntp, oblicated. (due sntp and AD to distribute time to pc's),
LPHvBvs> i dont advice chrony. But again thats personal, chrony should work.

LPHvBvs> On members, dont install ntp, just not needed, configure
LPHvBvs> systemd-timesyncd point to AD-DC ips. 

LPHvBvs> And last tips if you use systemd, is optimze your boot process. 
LPHvBvs> systemd-analyze plot > boot-prosess.svg 
LPHvBvs> IF you use that and are optimizing the boot process.
LPHvBvs> Use : systemctl edit servicename 

LPHvBvs> That keeps everything clean and that avoids
LPHvBvs> touching/adjusting by debian/system suplied files.

LPHvBvs> Test that a bit, and if you boot setup if perfect. Enable
LPHvBvs> unattended upgrades, yes then you can. 
LPHvBvs> My boot prio is. 
LPHvBvs> - wait for network
LPHvBvs> - enable bind
LPHvBvs> - enable ntp
LPHvBvs> - enable samba 

LPHvBvs> A simple example on smbd ( this applies for all samba
LPHvBvs> services but you need to to it for nmbd smbd samba samba-ad-dc )

LPHvBvs> systemctl edit smbd
LPHvBvs> [Unit]
LPHvBvs> Wants=network-online.target
LPHvBvs> After=network.target network-online.target nmbd.service winbind.service bind9.service

LPHvBvs> All i add here is : bind9.service ntp.service
LPHvBvs> Save and done.

LPHvBvs> If you dont use it, fine also but now its always starting
LPHvBvs> correctly if you use bind9 or ntp or not. 

LPHvBvs> Greetz, 

LPHvBvs> Louis

Gregory Sloop, Principal: Sloop Network & Computer Consulting
Voice: 503.251.0452 x121
EMail: gregs at sloop.net

More information about the samba mailing list