/srv/irclogs.ubuntu.com/2021/02/17/#ubuntu-server.txt

leftyfbaloini: ntpd or chrony00:25
leftyfbaloini: also, something is seriously wrong with whatever is writing to that media.log. It's 2 weeks ahead of time00:26
twbWhatever is writing "media.log" is broken and not using RFC 3339 timestamp format.00:27
twbThe fact that timedatectl indicates "NTPSynchronized=yes" is usually sufficient.  As long as the system is running for at least 6 minutes without a reboot, that will automatically get commited to the hardware clock.00:28
twbThat looks to me like you're running timesyncd's built in SNTP client, which is accurate to about 1 second.  If you need better accuracy, or you expect targeted attacks, you can use ntpsec (full NTP), preferably with an NTS-capable NTP server.00:30
twbWhat you've pasted so far looks like someone ran datefudge on whatever wrote media.log00:31
twbBleh, looks like if you want NTS right now you have to trust either Sweden or USA00:34
=== ijohnson|lunch is now known as ijohnson
=== vlm_ is now known as vlm
Chr15P_1968Hi, I need to configure grub2 to ask for a login when you want to edit any of the menu entries, The only guides I could find requires you to use a username and password when the system boots. We are moving from Centos to Ubuntu so I'm a bit new to the Ubuntu way of things, was a simple excersize on grub that ships with Centos to achieve what I07:30
Chr15P_1968needed. Is there a way in grub2 that ships with Ubuntu 20.04?07:30
HamidrezaHi guys, what is LimitMEMLOCK and the eefect of adjusting it in systemd on service?09:42
twbChr15P_1968: if you have a RHEL system around, look at /boot/grub/grub.cfg there11:19
twbHamidreza: "man systemd.directives" is the index; it will tell you which manpage covers LimitMEMLOCK.  That happens to be a ulimit, so also see /etc/security/limits.conf11:21
twbHamidreza: in general LimitX= are not useful except to increase LimitNoFile= in rare cases.11:21
twbHamidreza: for actual security hardening, run "systemd-analyze security" and "systemd-analyze security my-cool-unit.service"11:21
Chr15P_1968@twb, we are currently running centos VMs and protecting grub2 menu entries. https://paste.ubuntu.com/p/K3yzDyM8DM/ shows the steps I used.11:48
twbif they're VMs don't bother with grub at all11:49
twbjust tell libvirtd the kernel and ramdisk to boot directly11:49
Chr15P_1968I will look into it, how will you boot into rescue mode for example11:50
twbhttp://ix.io/2PJ111:51
twbChr15P_1968: if you need rescue mode then you need access to edit the VM's boot options11:51
twbWhich if they have they can always just bypass grub anyway by adding an ISO11:51
twbChr15P_1968: anyway, the steps you pasted sound reasonable for ubuntu also11:53
Chr15P_1968True11:53
twbinteresting that you are using EFI in VMs since currently that prevents snapshots in libvirtd11:53
Chr15P_1968update_grub doesn't read 01_users file, I created the file. also grub2-setpassword isn't installed. Trying to see if I need to install a package that provided the tool11:58
twbuse apt-file to see if it has another package or name12:02
twbre 01_users the path might be slightly different, I don't know offhand12:03
twbI don't use grub myself so I don't know without digging and ICBF12:03
Hamidrezatwb, I know what is limitx but I don't know what is Memory lock (MEMLOCK)12:11
twbHamidreza: did you read the references I cited?12:12
Hamidrezatwb, Yes but it wasn't MEMLOCK in it12:13
HamidrezaI can't understand what it will do?12:18
kierankHas the "alternate" installer for ubuntu server been deprecated?13:12
ograkierank, https://discourse.ubuntu.com/t/server-installer-plans-for-20-04-lts/1363113:14
ogra(effectively it was deprecared since 16.04 or so, 20.04 just finished that step)13:15
kierankhmm ok. It's very annoying as it turns on autoupdates by default13:15
ograthat has nothing to do with the installer13:16
kieranksure, but the alternate one didn't13:16
rbasakI'm pretty sure it did13:17
kierankno, you get a choice13:17
ograinstalling security updates automatically has been a default of apt and unattended-upgrades for a while already13:18
ograand thats really not an installer option13:18
kierankIn the alternate installer you get the choice of whether you want this or not13:19
rbasakIn any case, does it matter if it's an installer option or not? Server users will be customising their servers immediately after install anyway; otherwise what's the point of installing server? So just customise as you wish in the process you're already using after installation.13:19
ograthats definitely a bug ... but since that installer isnt supported anyway, thats a moot point13:20
kierankWe see sometimes kernels randomly updating in the field and dkms modules breaking13:20
ogra(if it would be supported i'm sure that option would have been removed)13:20
kierankand it's the fault of people using the new installer and having autoupdates on by default13:21
kierankand assuming the behaviour was like the old one13:21
ogranot really13:21
ograits the fault of the dkms stuff breaking ... but surely not the fault of apt updating things13:21
rbasakRegressions are bad and they shouldn't happen, so sorry about those. But I think you've got the wrong root cause here. It's *far worse* if users aren't installing security updates without realising that they're not.13:21
ografile bugs about these issues and get them fixed ...13:22
kierankI'm reporting what is happening in the real world, if you don't like it that's not my fault. But you can't blame users for change in behaviour13:22
kierank(cf: linus rants about this)13:22
rbasakWhere did we blame users?13:22
kierank14:19:43 <rbasak> In any case, does it matter if it's an installer option or not? Server users will be customising their servers immediately after install anyway; otherwise what's the point of installing server? So just customise as you wish in the process you're already using after installation.13:23
ograyou are nmot reporting anything ... you are complaining about the installer ...13:23
rbasakHow is that blaming users?13:23
ograreporting bugs happens on launchpad 🙂13:23
rbasakI'm just saying that if you want to customise your installation, you have an opportunity to do so.13:23
kierankBecause you assume the users now have to check quite complex config files for something that they had a choice of before13:23
rbasakThat's still not blaming users.13:23
kierankIt is13:23
kierankThe config files are quite complex and require multiple changes13:24
rbasakUbuntu makes decisions about defaults. That's part of what Ubuntu is. Part of the origin of Ubuntu is *not* asking users a bunch of questions.13:24
kierankWhereas in alternate, you had one option13:24
rbasakIt's entirely up to the Ubuntu project what the defaults should be, and what's appropriate to prompt during installation and what isn't.13:24
kierankIt was clear-cut before, now you have to edit config files based on guesses from stackoverflow13:24
rbasakIt's fine that you have a difference of opinion on that, and debates about what the defaults should be are welcome.13:24
kierankgreat user epxerience13:24
rbasakNot asking users a gazillion questions does make for a better user experience, yes. It's part of what gave Ubuntu early success over Debian.13:25
rbasakIf users disagree with defaults, there's usually a customisation option available.13:25
kierankchanging behaviour without telling them is not helpful13:25
kierankIs there actually an official way to disable autoupdates on server13:26
kierankthat doesn't involve stackoverflow guessing and incantations13:26
rbasakAutomatic security updates have been default in Ubuntu for many releases.13:26
rbasakThere has been no change in behaviour.13:26
rbasakIn the sense of what is default, anyway.13:26
kierankI don't know how to break this down to you: Before: clear option to turn them off in installer. After: ???13:27
rbasakChanging what set of questions get asked in the installer can be expected to happen from release to release anyway.13:27
kierankGo to stackoverflow and guess13:27
kierankuntil it breaks in production13:27
kierankbecause there is an edge case in another random config file13:27
kierankhttps://askubuntu.com/questions/1167314/disable-automatic-updates-ubuntu-18-0413:27
kierankpeople are literally guessing13:27
kierankhttps://help.ubuntu.com/lts/serverguide/automatic-updates.html13:27
kierankgoes nowhere13:27
rbasakSo we need a better answer there.13:27
kierankBlaming the users here is not helpful at all13:28
ograwho is blamingh users13:28
rbasakIn any case, turning off automatic updates without putting an alternative management solution in place is *a really bad thing to recommend that users do*.13:28
kierank14:19:43 <rbasak> In any case, does it matter if it's an installer option or not? Server users will be customising their servers immediately after install anyway; otherwise what's the point of installing server? So just customise as you wish in the process you're already using after installation.13:28
kierankAssumes users can somehow understand how to disable autoupdates via telepathy13:29
rbasakI don't think this conversation is being productive any more.13:29
rbasakI think I've made my position clear.13:29
rbasakNo point in continuing.13:29
kierankYes your point is "Blame the users" we get that13:29
rbasakIt is not.13:29
kierankThey must somehow guess how to go back to the old behaviour13:29
kierankPlease let me know the official way to disable autoupdates13:29
kierankThat used to work in alternate?13:29
rbasakYou might be able to use "dpkg-reconfigure -plow unattended-upgrades" or something like that to see the old prompt and get the old behaviour. I would test that though.13:31
kierankQED13:31
ograhttps://help.ubuntu.com/community/AutomaticSecurityUpdates13:31
kierankogra: that's to turn them on13:32
* ogra sighs and goes to do something useful instead13:32
kierankIt was one option field in alternate, it's now a huge complex config file13:32
kierankwith lots of edge cases13:32
kierankas I understand it, I've followed most of the online guides13:33
kierankbut random packages were still being updated13:33
isostaticrm -R /etc/apt13:34
kierankI think the way to do it is "systemctl disable --now apt-daily{,-upgrade}.{timer,service}"13:35
kierankBut who knows, I'll only find out at 2am when things are broken13:35
rbasakI wouldn't recommend that, as I think it'll also disable the motd message that informs you when security updates are available.13:35
kierankSo please let me know the official way to do it as it used to work in alternate?13:36
ograor just follow the guide i gave you above and call "sudo dpkg-reconfigure --priority=low unattended-upgrades" ... which gives you EXACTLY !!!!! what debian-installer could give you ...13:36
kierankI can file a ticket on launchpad but we'll rehash the same arguments13:36
rbasakI already made a suggestion.13:36
ograin either case, you should file a bug about the exact breakage you see with dkms pieces, so it can be fixed ... making ubuntu more insecure is *NOT* the solution13:38
kierankI have no idea how to reproduce said bug. Just wait for the next kernel update13:38
kierankIf you install the kernel manually dkms works fine13:38
rbasakSome DKMS breakages were a result of bug 1915051, which I'm just reviewing the fix for as it happens.13:38
ubot3Bug 1915051 in dkms (Ubuntu Hirsute) "dkms-autopkgtest: Also select binary packages that depends on dkms for testing" [High, In Progress] https://launchpad.net/bugs/191505113:38
kierankSo in a practical world the only way to fix this is to turn off autoupdates13:39
rbasakIt's how some DKMS packages skipped QA by accident.13:39
kierankI have this issue on 18.04 btw13:39
rbasakHelp to better document things that the community often want to do are welcome. Though IMHO any documentation on turning automatic updates off should come with a dire warning about getting an alternative solution in place to get security updates, as not doing so is completely irresponsible.13:41
rbasakHelp to fix regressions is also welcome.13:41
rbasakI don't see us adding a prompt to the installer though. The best place to debate that is probably https://discourse.ubuntu.com/c/server/17, but ultimately it's a trade-off, a decision needs to be made, and so people on one side are going to be disappointed. That's no reason not to help with the above two points though.13:43
kierankI don't think I'm getting the same issue here13:46
kierankHow do I simulate a kernel update that the auto updater would do as opposed to one that is done by the user?14:03
rbasakI think you can just run "unattended-upgrades"14:06
rbasakPerhaps with --dry-run if you want14:06
kierankI suppose if I install without internet connection I won't get updates the first time14:06
kierankthen I could try doing an unattended upgrade as soon as I enable the connection14:07
sigvI think you want the following apt configs: APT::Periodic::Update-Package-Lists "0"; APT::Periodic::Unattended-Upgrade "0";14:08
kierankI did that, it wasn't enough14:08
sigvUnattended-Upgrade::Allowed-Origins {}; ?14:09
kierankdon't know14:09
sigvwould be helpful for us to know what you tried to configure so far.14:09
kierankthose two as stackoverflow says14:09
kierankand then I got an unexpected update14:09
kierankSo I did "systemctl disable --now apt-daily{,-upgrade}.{timer,service}"14:09
kierankand that seems to stop things14:10
kierankBut I would rather understand why dkms fails on auto update14:10
kierankbut not on normal user prompted upgrade14:10
sigvAs mentioned above, I do not think you should be disabling apt-daily.service / apt-daily.timer "Daily apt download activities"14:10
kierankSure, I'm just trying to fix the problem now14:11
kierankTo not be woken up in the early hours14:11
sigvThe apt-daily-upgrade.service / apt-daily-upgrade.timer disablement might make sense, but I do not think you should be just out-right disabling them tbh.14:11
sigvCould just set up a Unattended-Upgrade::Package-Blacklist {};14:11
sigvfor your kernel and dkms concerns and then have a separate workflow for those.14:12
sigvFor the previous point, if you are managing a fleet = just put appropriate configurations in your orchestration, and installer defaults do not matter. If you are managing just a few servers and do not have orchestration in place, then just reconfigure unattended-upgrades.14:13
sigvActually wonder if you could just uninstall `unattended-upgrades` package, but hey.14:13
sigvNo, seems like a bad idea. Anyhow.14:14
dwigtonI set up a trunk port to my machine that only allows vlans 1 and 20. the Native vlan is set to 100 and isn't actually a thing. Since untagged traffic won't get passed how do I tell ubuntu to use enp0s25.1 instead of enp0s25?14:23
dwigtonI can get in fine since ssh uses vlan 1 but if I try to run updates ubuntu tries to make requests over enp0s25 which is untagged and of course nothing happens.14:25
twbdwigton: in netplan or in networkd?14:28
dwigtontwb: netplan14:29
twbNo idea about netplan, sorry14:29
dwigtonHow do you do it in networkd? maybe the ideas will give me a clue?14:30
twbEdit /etc/systemd/network/00-upstream.network and fiddle with VLANId=  I think14:31
twbOh it's just VLAN=14:32
dwigtonI am tempted to try to give enp0s25 an id and see what happens. the worst is that I have to drag a monitor and keyboard to the "server" *cough* NUC to recover.14:32
twbEgressUntagged=20 looks like the specific option you would want in systemd14:32
twbdwigton: yeah I 100% hate devices that still don't have HTML5 BMCs14:33
dwigtonhmm. the netplan documentation is either horrible or I am dumb.14:39
twbcould be both! :-)14:40
twbI was considering Ubuntu for its better secure boot <-> zfs integration, but took one look at netplan and just went "noooooope"14:41
twbToo close to network-manager bricking wired interfaces  back in 201014:41
=== ijohnson is now known as ijohnson|lunch
UssatIs anyone here familiar with MAAS ?20:06
rbasakTry #maas20:08
Ussatthank you20:10
Ussatwas unaware20:10
UssatHeh, seems to not be hight traffic, but thats ok I am patient20:13
rbasakYeah it might take a while20:15
twbUssat: it is always useful to "/msg alis help" on Freenode, and "/list help" on OFTC.20:15
Ussatya ya20:15
=== StathisA_ is now known as StathisA
=== ijohnson|lunch is now known as ijohnson
* enyc meows20:31
enyccurious -- will ubuntu-server releases tend to include/defaust to kernel 5.4 LTS always ?20:31
enycrather than HWE as per 20.04.2 desktop etc20:32
RoyKubuntu 30.04 will probably not default to that kernel ;)20:32
sarnoldenyc: I believe the server installers do default to the "ga" kernel and offer the hwe kernel as an option during install20:33
enycRoyK: aah yes true20:37
rbasakUbuntu Server 20.04.2 was released with HWE as an option.20:55
rbasakhttps://wiki.ubuntu.com/FocalFossa/ReleaseNotes#Installer20:55
rbasak"Starting from Ubuntu Server 20.04.2 the ISO images can optionally boot the installer using the HWE kernel. In this case the installed system will automatically make use of the HWE stack."20:56
=== hggdh changed the topic of #ubuntu-server to: Ubuntu Server discussion and support | For general (not server specific) support, try #ubuntu | IRC Guidelines: https://wiki.ubuntu.com/IrcGuidelines | home: https://wiki.ubuntu.com/ServerTeam | Docs and resources: https://ubuntu.com/server/docs

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!