/srv/irclogs.ubuntu.com/2018/10/13/#ubuntu-server.txt

plus2equalsmeFeel like this is a silly question. I'm in need of some help fine-tuning my acpi settings (running 18.04.1 server on a laptop, and the defaults aren't doing what I want them to do)02:00
plus2equalsmebasically, what I need to do is ignore the lid switch (aka, do nothing when the lid is closed) and blank the screen after a certain amount of time, without powering down anything else, and be able to bring the screen back up when I use the keyboard or trackpad02:12
sarnoldplus2equalsme: https://wiki.debian.org/SystemdSuspendSedation HandleLidSwitch=ignore probably does the trick02:13
plus2equalsmethank you sarnold I will look at that. Not sure how I didn't find it before (almost everything I've looked at assumes running X)02:16
sarnoldplus2equalsme: because there's only a thousand systemd manpages and how the heck would you know to look in the one for login.conf to find this :)02:16
plus2equalsmeTrue that sarnold02:17
plus2equalsme:)02:17
sarnoldhonestly I stumbled on this by complete accident one day..02:17
sarnoldI can't recall now what I was researching but it sure wasn't this ;) hehe02:17
plus2equalsmehehehe lucky me that you did! now if only I can figure out how to blank the screen but still be able to bring it back up if I need to (aka, if I can't get in via ssh)02:23
sarnoldyah :/ I haven't just stumbled on that one02:29
plus2equalsmeOooooooo, I think I did, at least partway. the beginning of the "magical incantation" (as I saw it referred to not long ago) is setterm. Looking at manpage now02:36
plus2equalsmemight also need to install vbetool, apparently02:42
plus2equalsmeok, gonna go check some things (machine is physically elsewhere02:47
plus2equalsmesarnold HandleLidSwitch=ignore worked. Currently waiting on the setterm (smallest interval is 1 minute)02:55
plus2equalsmefor future referrence, in case anyone else ever asks and I'm not here, setterm also works. Tomorrow I'll have to look at scripting it so that it's automatic anytime the machine reboots.03:06
plus2equalsmethank you so much03:06
plus2equalsmebut now it's time to start getting ready for bed03:07
ShellcatZeroHi, after an upgrade from 16.04 to 18.04, it appears dnsmasq was uninstalled and the machine lost all networking ability.  I managed to get internet back up on the server with a basic config for /etc/netplan, but the machine still cannot resolve local hosts from the DNS.  Any help is appreciated.13:46
ShellcatZeroI ended up just adding entries to the /etc/hosts file, but this doesn't help me when the hosts move to other IP addresses, still looking for a better solution.14:28
tomreynShellcatZero: do you have a search domain configured?14:31
ShellcatZerohow would I do that tomreyn?14:32
ShellcatZeroor check?14:32
tomreyni just installed 18.04.1 server using the live server installer to help you trouble shoot, it's booting now.14:32
tomreynso /etc/resolv.conf contains the search domain configuration here14:33
tomreynwhere /etc/resolv.conf is a symlink to /run/systemd/resolve/stub-resolv.conf14:34
tomreynthis systems' NIC is configured via dhcp14:34
ShellcatZeroright, and /etc/resolv.conf always gets overwritten from another config file, I didn't think the stub was supposed to be editted directly14:35
tomreynyou're right, it says "This file is managed by man:systemd_resolved(8). Do not edit."14:35
tomreynit also says "To manage man:resolv.con(5) in a different way, replace this symlink by  a static file or different symlink"14:36
tomreynand  "See man:systemd-resolved-service(8) for details about the supported modes of operation for /etc/resolv.conf"14:37
ShellcatZeroright, I haven't found anything helpful from there so far.  Between netplan, NetworkManager, and systemd-networkd, I am not sure what the most appropriate method is proper DNS configuration.14:40
ShellcatZeroor systemd-resolved14:40
tomreynShellcatZero: by default ubuntu *server* 18.04 uses systemd-networkd, optionally with netplan. https://netplan.io/examples#dhcp-and-static-addressing14:43
ShellcatZeroYep, that's what I used for my netplan config14:44
tomreynand it didn't giver you a search domain in /etc/resolv.conf ?14:45
tomreynAKA man:netplan(5) http://manpages.ubuntu.com/manpages/cosmic/man5/netplan.5.html -> "   Common properties for all device types" -> "       nameservers (mapping)"14:47
ShellcatZerothat file shows "nameserver 127.0.0.53", but the file says to check "systemd-resolve --status" for the actual nameservers, and the output there is listing my router as the nameserver14:47
tomreyni'm asking about search domain , not nameserver14:47
ShellcatZeroby that file, I mean /etc/resolv.conf14:47
tomreyn...since you said you can't resolve local domain names14:48
ShellcatZeroit does not list a search domain in that file for me, but none of my other servers list a search domain there either14:48
tomreyni see. so those local domains you said cant be resolved must be resolved by the nameservers the other servers have configured. are those the same nameservers you have configured on this server?14:49
ShellcatZerocorrect, but the other servers are on 16.04, and this one was just upgraded to 18.0414:50
tomreynok, but name resolution should still work the same. hmm. is this a virtual server maybe?14:51
ShellcatZerofrom the netplan man page you gave, I may indeed need to provide a search field in the YAML for this to work right. This is not a virtual server14:52
tomreynif you don't have a search line in /etc/resolv.conf on the other servers, you wouldn't need add a 'search' record on the netplan YAML on this system either.14:53
tomreynthat's unless the 16.04 servers have the 'search' line on /etc/network/interfaces instead as 'dns-search'14:53
ShellcatZerothey do not14:54
ShellcatZerothe subtle difference in 18.04 is that systemd-resolved is managing the networking now14:58
tomreynthen i guess they resolve the 'internal domains' via their resolvers. you can test this using, for example, dig.   dig internaldomainname.lan @ubuntu1604serversresolver14:58
tomreynreplace "internaldomainname.lan" by an internal domain name, replace "ubuntu1604serversresolver" by a 'nameserver' configured on a ubuntu 16.04 servers' /etc/resolve.conf (and keep the @ character)14:59
ShellcatZerodig works15:00
ShellcatZerobut I still cannot ssh or ping by hostname15:01
tomreynthat'd be a network configuration issue then15:04
tomreyn(outside of this server)15:05
tomreynwhere 'network' can also mean 'firewall'15:05
tomreyntry to ssh and ping to an internal servers' ip address15:06
ShellcatZerothis is the only server having this issue though, I can ping/ssh by hostnames from any of the other servers, and the other servers can resolve this hostname just fine, but this hostname cannot resolve names on the other machines15:06
tomreynso "systemd-resolve internaldomainname.lan" fails?15:07
ShellcatZeroit does indeed15:08
ShellcatZeroaccording to "iptables -L", the firewall config matches the other machines as well15:08
tomreynto confirm, "systemd-resolve --status" shows, for ths main NIC, the 18.04 servers' gateway as 'DNS Servers', and no 'DNS Domain'?15:09
tomreynths -> the15:10
ShellcatZerothat is correct15:10
tomreynwhen you ran dig, did you use the 18.04 servers' gateway ffor "ubuntu1604serversresolver"?15:11
tomreyn(i.e. is it the same ip address?)15:12
ShellcatZeroYes15:12
tomreynhmm, i'm puzzled now :-/15:13
ShellcatZerothe machine can ssh/ping by ip just fine as well15:13
ShellcatZeroI'll keep looking into it, and possibly post to askubuntu about the issue15:15
tomreynmaybe try "systemctl restart systemd-resolvd.service" and keep an eye on syslog15:15
tomreyn...also while you repeat the lookups for local hostnames15:16
ShellcatZerono errors observed in syslog15:19
ShellcatZerooh, wait a second, dig actually does not work15:26
ShellcatZeroI misinterpreted the output15:27
tomreynappending +short can help15:27
tomreynif you run the same dig command on the 16.04 servers, does it work there?15:28
tomreynand is the ";; SERVER: " responding the query identical15:29
ShellcatZerodig works fine on the 16.04 machines.  I'm not sure I understand your second question15:31
ShellcatZerothe other machines are receiving the exact same response from the 18.04 machine, if that's what you're asking15:32
tomreynthe non shortened output (i.e. run dig without '+short') of the identical dig command you run on the 16.04 and 18.04 servers should contain a line starting ";; SERVER: "15:34
tomreyni'm asking whether the rest of this line is identical on both the 16.04 and 18.04 servers15:34
tomreynthis is the resolver which responded to the dig query.15:35
tomreynif the same resolver responded the same request (as indicated in the ";; QUESTION SECTION") differently for the 16.04 and 18.04 servers, then we have to assume that your 18.04 server's IP address is not considered to be allowed to make these requests / is considered to be part of a different zone. i.e. a misconfiguration on the resolver.15:38
ShellcatZeroon the 18.04 system, the like looks like: ;; SERVER: 127.0.0.53#53(127.0.0.53)15:38
ShellcatZeroon 16.04, it looks like: ;; SERVER: 192.168.1.1#53(192.168.1.1)15:38
tomreynso you didn't specify the resolver when running dig15:39
ShellcatZerooh15:39
evitAnyone seen if there is an effort to update the PHP version to address this vuln https://www.cisecurity.org/advisory/multiple-vulnerabilities-in-php-could-allow-for-arbitrary-code-execution_2018-113/15:58
evitVery lively in here today... 8*P16:04
mybalzitchjust sounds like fear mongering.16:14
evitmybalzitch, I don't understand what you mean by that.16:36
tomreynevit: you'd need to identify the CVE IDs for these vulnerabilities, then look them up on https://people.canonical.com/~ubuntu-security/cve/16:42
tomreyn(and i don't know what mybalzitch means, either)16:42
evittomreyn, I don't see that it has a CVE yet16:43
tomreynevit: it lists php.net bug tracker IDs, and those have fields for CVE IDs.16:44
tomreynexample: "Bug #76796 (Compile-time evaluation of disabled function in opcache causes segfault)" is http://bugs.php.net/76796 , which says "CVE-ID: None". so in this case no cve id was assigned (yet?), but it may be the case for some of the other bugs.16:45
ubottubug 76796 in evolution (Ubuntu) "evolutions consums lots of cpu while pinging imap server" [Low,Invalid] https://launchpad.net/bugs/7679616:45
tomreyn^ ignore16:46
evittomreyn, http://php.net/ChangeLog-7.php#7.2.11 Shows CVE-ID: None16:46
evittomreyn, This is true for 7.1.x and 7.2.x - no CVE ID listed16:46
tomreynevit: so if the php developers consider those not worth assigning cve id's then i doubt they'll get handled.16:47
evittomreyn, Ahhh, I see. I was wondering why16:48
tomreynthat's unless someone else will request those bugs to be fixed by opening bug reports for each of them and tagging them security, in which case they *may* get a cve assigned by a linux distro instead, and *may* be considered important enough to have bugfixes developeed and backported.16:49
mybalzitchevit: there's no obvious remote code execution warned about in that "CVE", it's basically the PHP changelog for a newer version.16:52
evitmybalzitch, That what I figured you were hinting at but wasn't sure.16:53
tomreyngood point. those are (on a quick glance) just bug fixes, no security impact is indicated on the changelogs. so it's unclear what the "remote code execution" would be about.16:58
tomreynwell the memory corruption might have security impact17:00
evittomreyn, DoS conditions aren't very good either. =)17:07
tomreynevit: right, but did you spot one?17:09
mybalzitchand it's not like any of that means you can just go to a .php page and magically cause a dos/exploit just by visiting the page17:11
evittomreyn, only going off of what I read17:11
evitmybalzitch, It depends on what you are using to visit the page. Kali has quite a few tools you can 'visit' a page with that can do just that17:16
mybalzitchand it works against the php version currently shipping in ubuntu-server ?17:17
evitI have not seen any manifestation of it but that is why I'm asking here if anyone else has...17:19
evittomreyn, mybalzitch Thanks1 I gotta jet17:30

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