/srv/irclogs.ubuntu.com/2022/11/28/#ubuntu-server.txt

Beretå/b 502:43
bigdaddy63376My laptop suspended when I closed the lid.  I think a server OS should not do that.  I would like /etc/systemd/logind.conf in the install media to have HandleLidSwitch=ignore05:49
bigdaddy63376Do I need to do this myself and get access to place a pull request? 05:59
bigdaddy63376Or is there someone here who knows about the maintainer for the package that contains that file?05:59
mybalzitchyou can edit the file yourself06:05
Maikbigdaddy63376: i'd go for a raspberry pi 4 and uses that as a server, laptop aren't really made for that.07:42
znfif you ever manage to find a rpi in stock :)07:59
ahasenackis there some sort of "who am I" command for the current ubuntu release I'm running?13:32
ahasenackor should I just parse /etc/os-release?13:32
ahasenackI didn't want to source that whole file for just one variable13:32
ahasenackah, there is lsb_release -cs13:33
jfsimon1981_bHi, Could someone let me know how we properly do a subnet with nat ?  I have a lan at 10.0.*.* and i need to create a subnet 192.168.100.* with nat and dhcp for test purposes13:38
jfsimon1981_bhttps://pastebin.com/dKFSqUHm13:38
jfsimon1981_bI crafted a configuration file though it's not yet working, this is the complete file13:39
jfsimon1981_bThanks13:39
znfahasenack, the preferred and reliable way is to source /etc/os-release14:19
ahasenackI don't want to potentially "pollute" my shell script with random variables14:19
znfyou're not poluting with "random" variables14:19
ahasenackwell, it's an external file I don't control14:20
znfbut that's the proper and reliable way to determine OS across multiple distributions and linux releases14:20
znfhas been a standard for a few years now14:20
znfa minimized 22.04 doesn't have lsb_release, AFAIK 14:20
sdeziel`awk -F= '/^VERSION_CODENAME=/ {print $2}' /etc/os-release` should avoid the pollution14:22
znfI'm sure the 1kb of memory saved will be appreciated :P14:26
samy1028cHello all.  We have a system with exim4 running with custom user:group.  However, every so often (6 or more months) it seems something on this Ubuntu 20.04 FIPS LTS is resetting permissions back to Debian-exim:adm.  Any ideas what to look at?15:34
samy1028cWe updated the cron.daily/exim4 to have the custom user:group when tidydb runs.  However, even if something daily ran, it doesn't explain why after 9 months the permissions reset.15:36
samy1028cIs there anything in Ubuntu itself that might be causing this?15:36
sdezielsamy1028c: does the permission/ownership reset happens at the same time the exim4 package is updated?15:38
samy1028csdeziel: ahh, actually, I hadn't looked at dpkg.log.  It does show that exim4-base updated at the time exim4 stopped working.15:40
samy1028chmm, so a question - how do I get it to not clobber the permissions?15:40
rbasakhttps://git.launchpad.net/ubuntu/+source/exim4/tree/debian/exim4-base.postinst?h=applied/ubuntu/focal-devel resets the permissions I think?15:40
rbasakI'm not sure the packaging supports use of a custom user/group.15:40
samy1028cso, why did it even update?  We purposefully do not install updates automatically because we have to test through our scripts and such to ensure non-breakage.15:41
rbasakHow have you configured updates not to install automatically?15:42
samy1028cI run "apt list --upgradeable" and there are a number of items waiting on us to trigger the updates on after regression testing/QA is completed on our dev systems.15:42
samy1028cWhat exactly does "install" do in init.d?   ./rc3.d/S01exim4:    install -d -oDebian-exim -gDebian-exim -m750 /run/exim415:43
samy1028crbasak, how can I double-check the automatic updates?15:43
samy1028cahh, /etc/apt/apt.conf.d/50unattended-upgrades15:45
rbasakIt's pretty hacky/unsafe to rely on not installing updates to avoid an update from reverting an unsupported configuration change. I'd find another way to solve your problem.15:46
samy1028cyeah, perhaps a cronjob to check permissions regularly.15:50
samy1028cWe may also review our need for the custom permissions as this may have been required when we first deployed this system on 18.04 several years ago.15:50
rbasakNo, that's just as bad. Stop chasing your tail!15:50
bG9sI mean restorecon exists to basically check contexts (basically similar to permissions)15:56
bG9snot a bad idea to make sure permissions and contexts are in order15:57
=== elastic_dog is now known as Guest5195
ahasenackcan somebody see a mistake here? It's like "apt-get update" wasn't run. If I shell into the container, run apt-get update, then try to install those strongswan packages, it works: https://pastebin.ubuntu.com/p/Nx9JwV8gn7/17:56
patdk-lapyou are even running cron inside the container?18:00
patdk-lapnone of mine do, so it would never autoupdate a container18:00
=== blackboxsw_away is now known as blackboxsw
ahasenackfound it, cloud-init was still running in the background and changing sources.list, which invalidated the first apt-get update run18:32
=== lord_black is now known as lord_daemon
sarnoldahasenack: that feels like it's worth a bug report, perhaps cloud-init ought to be locking the apt frontend lock or something while doing its thing20:45
ahasenackthere is this trick that I have seen other use, and I am using now too:20:46
ahasenacklxc exec "${container}" -- cloud-init status --wait20:46
sarnoldoh nice. i mean, a bit annoying, but at least there's a thing for that :)20:47
blackboxsw+1 on that blocking `cloud-init status --wait` trick (sry was afk earlier). But, if one process is running something like ` DEBIAN_FRONTEND=noninteractive apt-get install` shouldn't the apt/dpkg locks be setup already to block other services trying to install pkgs?20:49
ahasenackthat is not the issue20:49
ahasenacksources.list was rewritten after my first apt-get update20:50
ahasenackso that invalidated that apt-get update20:50
ahasenackit was like this20:50
ahasenackapt-get update20:50
blackboxswahh ok20:50
ahasenackcloud-init rewrites sources.list20:50
ahasenackapt-get install <package>20:50
ahasenackpackage: not found20:50
blackboxswahh so race on config file update vs final apt-get install20:50
ahasenackyeah, I was doing "apt-get update && apt-get install package"20:51
ahasenackbut in between, sources.list got rewritten by cloud-init20:51
blackboxswyeah, hard to avoid that situation without either providing the directives in #cloud-config specifically via `packages: [package]\npackage_update: true` or by just externally calling cloud-init status --wait (or setting up a systemd service that is `After=cloud-init.target`20:56
k8yunhello... does anyone have a good tutorial link to setting up postfix in ubuntu? Looking to only send emails out as notification system.23:38
sarnoldk8yun: try https://ubuntu.com/server/docs/mail-postfix23:40
Teridonubuntu autoinstall question with cloud-init ssh_keys.  During autoinstall, I see that /etc/ssh/ has the keys I specified in my user-data file.  But after install finishes and reboots, it has new keys.  I do have "ssh_deletekeys: false" in the top level of the user-data.  It's also generating a dsa key, despite the specified "ssh_genkeytypes"   https://dpaste.org/q1dPA  not sure if my PXE boot line is relevant; the "cloud-init-bios23:40
Teridon" directory has the user-data file  https://dpaste.org/RWVBP23:40
k8yunthank you. I will go through the link.  I had gone through a few links and all of them did not allow me to send an email out so far but I will give this link a try.23:41
sarnoldk8yun: depending upon where you're hosting your machine, itmight be worth talking with your isp or managing 'security groups' on the machine or whatever23:42
sarnoldk8yun: it's pretty common for smtp to be blocked everywhere to cut down on spam23:42
sarnoldk8yun: .. and also pretty common for smtp recipients to be brutal with RBLs and so on to block mail from dynamic ranges, entire countries, etc23:43
k8yunI see.  I am not too familiar with how smtp works.  I tried to send to my work email then the `/var/log/mail.log` showed that it was trying to connect to my work domain.  23:43
k8yunso I think I might need to implement some security measure in the set up so that my work email server recognizes it as a safe sender or something... not sure... I will go through the link provided and find out more I guess23:44
Teridonrelated:  if your DNS doesn't have SPF setup you're probably also going to have trouble23:44
Teridonis this channel archived? if so where?  my VPN is sometimes unstable and I don't want to miss a reply23:46
blackboxswTeridon: archive of this channel https://irclogs.ubuntu.com/2022/11/28/%23ubuntu-server.html  it's a few hours behind23:50
Teridonty23:50
blackboxswTeridon: also autoinstall question. the Ubuntu live installer (server and desktop) actually runs cloud-init in two boot stages. if you provide top-level #cloud-config keys outside of 'autoinstall:' those keys will apply the the ephemeral pre-provisioning environment (not the target installed system after reboot)23:51
blackboxswif your keys you pasted are provided below autoinstall:user-data:X,Y,Z then they'll apply to the final installed environment across reboot.23:52
sarnoldblackboxsw: that sounds like a very useful thing to know. do you know if it's written down anywhere? :)23:57
sarnoldaha! it is! it is! though I think I might have overlooked it if I hadn't been looking for it23:58

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