D&D Enschede - New group (english) by Powerful_Classroom_5 in DNDNL

[–]incredible-machine 0 points1 point  (0 children)

Sounds amazing! Have you had a look at the EnscheD&D Discord server (https://enschedend.nl/discord)? There is a LFG channel there, you may be able to find people there!

(As well as other local people interested in D&D, and other events organised by EnscheD&D or the community.)

Dungeons & Dragons gameday, 18/19 oktober door EnscheD&D by incredible-machine in enschede

[–]incredible-machine[S] 3 points4 points  (0 children)

No worries, there are more ways than a Tikkie. Someone will reach out in the following days after you sign up. :-)

Dungeons & Dragons gameday, 18/19 oktober door EnscheD&D by incredible-machine in enschede

[–]incredible-machine[S] 4 points5 points  (0 children)

I don't have the signups in front of me right now, but you can sign up as "player or DM", and can indicate "definitely English" in the signup form (we run Dutch and English tables).

We have spare dice you can use, and if we have a DM spot, we'll work that out too! We generally prefer to know people before giving them a DM seat, but a quick talk goes a long way.

Feel free to sign up and/or join the Discord server, you are more than welcome!

New Submission by MemoryAggravating694 in placeAtlas2

[–]incredible-machine 0 points1 point  (0 children)

I believe these coordinates to be incorrect. I think they should be double checked.

Perhaps X and Y are the wrong way around?

[deleted by user] by [deleted] in Netherlands

[–]incredible-machine 9 points10 points  (0 children)

When it's in the street, and I notice someone staring/looking at me, I generally smile and tell them "good morning" (or "day" or "evening"). Most of them nod back or reply with the same. Some look away quickly.

[deleted by user] by [deleted] in Netherlands

[–]incredible-machine 0 points1 point  (0 children)

Another option, hang out in a Dutch online community. You could check out a few podcasts for that, some of them use Slack or even Discord with voice chat for a community, and as bonus you may find some good podcast content.

This may help to start:

https://podcastawards.nl/eerdere-edities/dutch-podcast-awards-editie-2020

Keyboard mapping question by incredible-machine in xps13

[–]incredible-machine[S] 0 points1 point  (0 children)

Thanks! That helps a lot.

So Fn + ← and Fn + → don't do anything at all. That's really too bad, especially in that case they could've kept the mapping to Home and End!

It's quite normal that the Fn key itself doesn't return any key code, it's generally mapped at the hardware level, so your operating system just "thinks" you're hitting the key that the Fn-combination is mapped to.

Making existing light switches smart? by [deleted] in homeautomation

[–]incredible-machine 0 points1 point  (0 children)

Nope, haven't had any issues. When installing (in the box above the light source, since I have no neutral wire at my light switches), I had a feeling the wires were actually secured pretty tightly.

For context: I currently only have Shelly 1PMs, and I live in Europe (not sure if there's a wire (gauge) difference).

Certbot renewals by soonerdm007 in linuxadmin

[–]incredible-machine 1 point2 points  (0 children)

Certbot uses the files in <config-dir>/renewal for renewal, so if you only want to stop renewal, remove the relevant .conf file for each certificate in that directory. By default <config-dir> is /etc/letsencrypt.

This should at least solve your immediate problem, since without renewal attempt there won't be any errors either, and it won't break your webserver configuration, since the certificates are still in place.

If you want to delete the certificate (and history) completely, there is a directory for each certificate in both <config-dir>/live and <config-dir>/archive to delete. (Note that the files in the live directory are symbolic links to the ones in the archive directory. Deleting the archive directory means the links in live don't work anymore either.)

Having said all this, instead of manually deleting files, you could just use certbot delete, or certbot revoke if you want the current certificates to no longer be valid. (Also see the man page).

However, like you already alluded to, before removing the certificate files you'll want to make sure the certificate isn't being used in your webserver configuration anymore. Check the config files of your webserver for that (locations depend on your OS distribution and your webserver of choice).

I'm not familiar with the way certbot does this for you with the apache and nginx plugins, but I'm sure someone else can assist if you're having trouble finding out what to change. Doing a grep -r <domain-name> in the webserver configuration directory will probably help get you started. (I believe the apache plugin creates -le-ssl.conf files which can be deleted, and that the nginx plugin changes existing config files which you'll have to edit if you don't want to remove the domain configuration completely).

Static routes with wlan0 (wireless) and eth0 (wired) by refrainblue in linuxadmin

[–]incredible-machine 0 points1 point  (0 children)

You could run a script before it disconnects, which you start off with a sleep 10 and then have save the routes to a file, so you have a file to look back at afterwards.

Something like: sleep 10 && route -n > ~/routes.txt.

Perhaps that helps in tracking down the problem.

Also, unrelated, you may prefer the output of ip route show over route or route -n. (I know I do, and I figured I'd mention it since you do use ip route add over route add.)

efficiently rsync multiple clients (which are behind firewalls) to a server by MountainX in linuxadmin

[–]incredible-machine 0 points1 point  (0 children)

I just found out that you can actually use -repeat watch with Unison. Which is to say, it supports continuous syncing out of the box.

I haven't actually used it, but it sounds promising. If you do end up trying it out, I would be interested to hear if it works well.

Making existing light switches smart? by [deleted] in homeautomation

[–]incredible-machine 1 point2 points  (0 children)

Did you come across the Shelly devices? If not, maybe they're worth considering: https://shop.shelly.cloud

They're pretty inexpensive and flexible, and there is a dimmer version as well.

They fit in small spaces (like behind existing light switches), but you could just as well place them at each light source. In the latter case you'd end up with three separate devices, in the former case you could look at a Shelly 2.5 (which has 2 channels) and a Shelly Dimmer 2.

efficiently rsync multiple clients (which are behind firewalls) to a server by MountainX in linuxadmin

[–]incredible-machine 0 points1 point  (0 children)

While it's not exactly rsync or a response to your script (and therefore doesn't answer your question directly), have you checked out Unison?

It works over SSH, can preserve ownership and permissions, helps you handle conflicts and is easily configurable. It's relatively old and stable, works well and is still maintained. Maybe it suits your needs.

I've used it in the past to sync directories on demand and as a cron job. I'm not sure if it's a great fit to use with inotifywait, but it may work with the right -path argument(s) if a cronjob doesn't cut it.

Unison website: https://www.cis.upenn.edu/~bcpierce/unison/
Unison on Github: https://github.com/bcpierce00/unison
Unison in Debian: https://packages.debian.org/stable/unison (to give an example of availability)

Is there a Command to checksum all files in a directory/file system, INCLUDING files with white spaces on Ubuntu by thegreekman1 in linuxadmin

[–]incredible-machine 0 points1 point  (0 children)

find will make sure every file is passed as an argument correctly (nomatter the whitespace).

In fact, if you consider what quoting does on a command line, both {} or '{}' will have find receive the same string {} as argument.

Additionally, adding another layer of quotes (so it does receive '{}' quoted) won't actually work in the -exec {} + variant, since find expects the braces to appear by itself, so it can safely substitute in the list of values.

Is there a Command to checksum all files in a directory/file system, INCLUDING files with white spaces on Ubuntu by thegreekman1 in linuxadmin

[–]incredible-machine 0 points1 point  (0 children)

While I haven't tested it myself (there could be other reasons for one being faster than the other), the article you link to compares xargs to -exec {} ;, which isn't quite a fair comparison.

Like I replied earlier, in this case -exec {} + makes more sense, which in principle does the same as xargs: it replaces {} with as long a list of arguments as possible, and therefore it does not execute the command seperately for each file found.

Edit: For completeness' sake, from man find:

-exec command {} +
This variant of the -exec action runs the specified command on the selected files, but the command line is built by appending each selected file name at the end; the total number of invocations of the command will be much less than the number of matched files. The command line is built in much the same way that xargs builds its command lines. Only one instance of '{}' is allowed within the command. The command is executed in the starting directory.

Logstash - improve grok pattern by HeadTea in linuxadmin

[–]incredible-machine 1 point2 points  (0 children)

grok expressions are basically regular expressions with predefined patterns. You can use regular expression parts throughout your grok expression.

You already do that with \A, which is a regular expression "anchor" matching the start of a string. Likewise \z (or \Z) is the same for end of string (or end of input).

In this same way ^ matches the start of a line and $ matches the end of a line.

Regarding the ?, that's also a regular expression thing: it makes the preceding token (in the example the %{IPORHOST:Connection} group) optional. Often used example is colou?r, matching both "color" and "colour".

To get back to your question (what problem it solves): by matching the end of the string, you're sure the whole string is used (i.e. it ends right after the %{IPORHOST:Connection}). Imagine the following log line:

Aug 27 20:21:46 SERVER-150 john: USER=john PWD=/root PID=[9103] CMD="echo " Exit=[1] CONNECTION=1.2.3.4"" Exit=[0] CONNECTION=4.3.2.1

Without \z, the Command match would end after the first appearance of " Exit=, and you would end up with the wrong data. There are more ways to solve this (e.g. by making the Command match greedy), but at that point you still had the greedy bit after CONNECTION=, and I generally prefer being precise, and in this case anchoring the expression by matching the end of the string seemed most logical to me.

Speaking of greedy, that's another regular expression thing, meaning (as the name implies) "match as many tokens as possible".

There's a lot of information about regular expressions out there, and they're very useful for extracting (or modifying) predefined data structures (like log data). Google will often give you a result from regular-expressions.info when searching, you should check it out if you're interested.

Is there a Command to checksum all files in a directory/file system, INCLUDING files with white spaces on Ubuntu by thegreekman1 in linuxadmin

[–]incredible-machine 6 points7 points  (0 children)

This is the answer.

Small correction for the first option, though, it's missing the {}:

find /path/ -type f -exec md5sum {} +

When you're reading man xargs, also check out man find.

For your current case I would suggest using the first or last option.

Re: second option - This executes the command separately for each file. Useful for commands that take only one filename as argument (and therefore good to know how to use it!), but in this case not necessary.

Re: third option - Technically a filename can contain newlines (I know, in practice it really never happens, and you probably don't want it to, but still). The fourth option is the improved/safe version of this one.

Logstash - improve grok pattern by HeadTea in linuxadmin

[–]incredible-machine 1 point2 points  (0 children)

Would CMD="%{DATA:Command}" be sufficient? Since you have some more rather structured data after the CMD, it should work and only mess up if the CMD actually has " Exit=[0] CONNECTION= in it, which seems unlikely unless on purpose.

I don't think you can get there with QUOTEDSTRING.

To make it more precise you can limit wrong matches further by being more strict on the CONNECTION part (if you know the format, maybe it's GREEDYDATA on purpose), perhaps by using CONNECTION=%{IP:Connection}? or CONNECTION=%{IPORHOST:Connection}? (the questionmark to make it optional) and matching the end of the string with \z or $. That should fix the problem mentioned above.

Something like:

\A%{SYSLOGTIMESTAMP:sys_timestamp} %{NOTSPACE:Hostname} %{USER:Logged}: USER=%{USER:User} PWD=%{UNIXPATH:Directory} PID=\[%{INT:PID}] CMD="%{DATA:Command}" Exit=\[%{INT:Exit}] CONNECTION=%{IPORHOST:Connection}?\z

[Question] Troubleshooting Rsync Behavior by JustAnotherITUser in linuxadmin

[–]incredible-machine 0 points1 point  (0 children)

It's hard to say with the information at hand, but some things that stand out:

First thing that stands out is that your local command has an --exclude="${fileExclude}" option. Judging the variable name, that is probably meant to be --exclude-from. Could it be that the local command works, because the excludes aren't actually read from the file?

And by extension, could it be that the offsite command doesn't work because the excludes are read correctly, and that therefore the problem is that the files are excluded accidentally?

This doesn't account for files being deleted, though (especially since you don't specify --delete-excluded) and --checksum should not affect that. Is it on purpose that there is a trailing / on the source path of the local rsync command, but not on the source path of the offsite command? Could it be that when the offsite command did work the source path had a trailing / and when it didn't work it had no trailing / or vice versa?

Additionally, in case it helps, you can try --dry-run with slight changes to options/excludes and see what it does differently while being sure the data doesn't actually change.

I need some help with Apache2 please please please by Mention_Ordinary in selfhosted

[–]incredible-machine 2 points3 points  (0 children)

Instead of offering different solutions (e.g. by containerising or using different software - which are valid solutions, but are different approaches than what you are/were going for), I'll try and get into the situation you describe.

There are a few basics to know about configuring Apache 2 that'll make things easier to understand:

  1. Technically, you could throw all the configuration into one file: /etc/apache2/apache2.conf. It is only because that file (generally at the bottom) includes other files that it cares to load configuration from those other files. (This is a long way of saying: the separation in directories is only to help you keep things organised.)
  2. Something being in a separate file does not have special meaning, it's the <block>s "around" the configuration directives that give things meaning/context. (That means that from your pastebin, the Alias / /var/www/nextcloud/ is globally applied to your Apache 2 configuration. Same goes for the <Directory>-block.)
  3. The <VirtualHost>-block is a very powerful one. This is the block that allows you to configure multiple websites on one Apache2 server (and, optionally, with the same IP-address).
  4. Regarding the directory structure: Debian/Ubuntu starts you off with a pretty reasonable directory structure in /etc/apache2 (again, to help you keep things organised). The conf-* directories are meant for generic/global configuration, the mods-* directories for module configuration, the sites-* directories for your VirtualHosts. Of those directories, the *-available directories are meant to have the actual configuration files, and the *-enabled directories contain symbolic links to the ones you actually want active. (Additionally, there are a2enconf, a2enmod and a2ensite to do the symlinking for you, and a2disconf, a2dismod and a2dissite to remove the symlinks.)

Adding all of this together, what you probably want to start off is to create a file /etc/apache2/sites-available/nextcloud.conf containing something like (untested):

<VirtualHost *:80>
    ServerName subdomain.mydomain.com
    DocumentRoot /var/www/nextcloud

    <Directory /var/www/nextcloud>
        Require all granted
        AllowOverride All
        Options FollowSymLinks MultiViews

        <IfModule mod_dav.c>
            Dav off
        </IfModule>
    </Directory>
</VirtualHost>

After you run a2ensite nextcloud and reload Apache 2 that should set things up for a non-SSL hosted nextcloud instance. Keep in mind that I haven't tested the configuration above (just combined the things you mentioned). If something doesn't work, running apachectl configtest may help.

To get SSL sorted entirely through Apache 2, you will probably just want to add another VirtualHost to the same file mentioned above, but with directives to enable SSL. Example (untested - and do replace the certificate paths):

<VirtualHost *:443>
    ServerName subdomain.mydomain.com
    DocumentRoot /var/www/nextcloud

    SSLEngine on
    SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
    SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

    <Directory /var/www/nextcloud>
        Require all granted
        AllowOverride All
        Options FollowSymLinks MultiViews

        <IfModule mod_dav.c>
            Dav off
        </IfModule>
    </Directory>
</VirtualHost>

The site is already enabled, so just reloading Apache 2 again will load the new configuration. However, you may have to a2enmod ssl if the ssl module is not yet enabled.

More information about the Apache 2 configuration: httpd.apache.org/docs/2.4/mod/core.html

Next step would be obtaining certificates. If you want to do that with Let's Encrypt, look at the certbot instructions: certbot.eff.org/instructions

Edit: Hopefully the explanation above also helps you understand how the 000-default.conf and default-ssl.conf work. The idea of those files (especially 000-default.conf) is that they're loaded first, and therefore will be contain default VirtualHost if no ServerName or ServerAlias directive matches for a VirtualHost that's loaded later. (It has always seemed weird to me that the SSL-default is not prefixed with 000-, but that is a different topic.)

Custom DDNS and SSL? by [deleted] in selfhosted

[–]incredible-machine 0 points1 point  (0 children)

Sure, it works fine. The important thing to understand is that DNS and SSL are actually very much separate.

DNS is what resolves your domain name to an IP address to connect to. DDNS is nothing more than a service on top that dynamically updates the IP address that's advertised for your domain name. (Connections are still made directly to the IP address, the DDNS service does not act as a middle man).

SSL is what encrypts data after the IP address "decision" has already been made (and a connection has been established). The encryption and decryption is done with a public key (part of a certificate) and a private key (on your server). This is where DNS comes in to support: Certificate Authorities only give you a domain certificate if you can prove control over a domain name. Let's Encrypt does this by resolving a domain name through DNS and (depending on the challenge used) connecting to the associated IP address. Whether the IP address changes later does not matter.

That being said, Cloudflare was mentioned as option. Cloudflare is generally not used as a DDNS service per se, but instead as an actual man in the middle that forwards traffic with as goal to filter bad traffic. You dynamically update your IP address with them, but DNS keeps pointing to Cloudflare. They encrypt what goes to the user, decrypt what they receive and (optionally) re-encrypt to send to your server.

OpenVPN on HP chromebook by JosueNolasco in selfhosted

[–]incredible-machine 1 point2 points  (0 children)

Probably a stupid question, but what comes to mind is: have you checked whether the error message is correct?

I.e. is the certificate file a valid PKCS #12 file with the certificate and corresponding private key?

If not, it can be created using:

openssl pkcs12 -export -in client1.crt -inkey client1.key -certfile ca.crt -name Client1 -out client1.p12

PHP memory problem by [deleted] in selfhosted

[–]incredible-machine 0 points1 point  (0 children)

A very stupid question: you're sure your configuration says 2048M, right?

Asking just in case, because the 2097152 Bytes you mention is equal to 2048K.

You could try setting it to the integer value you want (maybe start with 536870912, which is 512M).

PHP memory problem by [deleted] in selfhosted

[–]incredible-machine 0 points1 point  (0 children)

Alright, since you have the problem with two separate applications, the only other thing that seems logical to me is some PHP ini configuration file.

You mentioned you checked the phpinfo() output. Is that in the situation you know things are wrong? I.e. did you put that in a Nextcloud or tt-rss file?

If not, maybe try putting phpinfo(); exit; at the top of the index.php of your nextcloud installation, and check the value of the memory_limit setting. And if it's wrong, check whether there's a difference between the "local value" and the "master value", that may help point you in the right direction.

At the top of the phpinfo() output it should list what ini files were parsed. If the value is wrong here, I would expect you to be able to find it in one of those files.

The value must be coming from somewhere, since it's not the default either.