Better HN
topnewbestaskshowjobs
Log inSign up

Ao7bei3s

1,549 karma · joined Dec 5, 2012 (13y ago) · 595 submissions

Submissions

comment 10y ago · link · parent

The X1 Carbon has a Skylake CPU, so the problem that Linux doesn't have support for the higher C-states resulting in reduced battery life and reduced total CPU lifetime should apply to you, right??

Previous HN discussion: https://news.ycombinator.com/item?id=11492070

(I have tested the predecessor (gen3) and liked it. I'm waiting for the 16GB gen4 X1 Carbon to become available here in Germany, drop enough in price to be affordable, and for Linux to support all the C-states.)

comment 10y ago · link · parent

If you really wanted to find out about the quote, it's just a google search away. For everyone else, it's useless pop culture trivia obscuring real content.

(The right way to do this would be to add a feature to the HN/reddit forum software that allows unobtrusive footnotes to comments. Acronyms could just be auto-hyperlinked (with short definition in the alt text) in the original comment.)

comment 10y ago · link · parent

Or, even better, the printer exposes toner levels and page count -- it's a printer, what else is there to know? -- via SNMP so you can, say, put it in Observium and get nice graphs with minimal effort.

comment 10y ago · link · parent

Here's why I think configuration management, Ansible in particular, would be a good idea for your use case:

1. Playbooks are executable documentation that's concise, accurate and doesn't rot away as fast. And no one can put off writing it.

2. If you keep them in git, you'll later have a history of what changed when - and who did it!

3. Your servers will stay consistent. Less trying to debug why server X behaves differently than server Y. No more forgetting one server when doing mass changes.

4. Your members will need to learn one less thing specific to your infrastructure.

5. Your members may learn something useful. It's a CS student council, they should be able to pick it up. And they don't need to understand it completely right away. (I know that's a controversial thing to say in university circles ;) Copy/paste + knowing how to run it should be enough at first.

6. Once you have it in place, you can still decide if you want to automate more things -- or not!

7. Why Ansible in particular: no server side software, leaves no trace on server -> you can always just stop using it.

Note: It's totally ok to not do everything but just the common things in config management.

Here's a hopefully complete (but untested) example optimized for beginner-friendlyness, just to give you an example. It's shorter than your code!

  # On workstation, nothing extra is needed on servers (well, except Python):
  dnf install ansible

  # Put your own SSH key on the servers manually.

  # File "site.yml":
  ---
  - hosts: all   # "all", or a hostname, or a groupname
    vars_files:
    - keys.yml
    tasks:  # always executed in the order they're written
    - authorized_key: user="root" key="{{ item }}" state=present   # use state=absent to remove keys
      with_items: user_keys["Alice"]
    - authorized_key: user="root" key="{{ item }}" state=present
      with_items: user_keys["Bob"]

  # File "keys.yml":
  ---
  user_keys:
    Alice:
    - "ssh-rsa AAA....."
    - "ssh-rsa AAA....."
    Bob:
    - "ssh-rsa AAA....."
    - "ssh-rsa AAA....."
  
  # File "hosts":
  [my_hosts]  # This line is optional. It groups hosts.
  demo-host ansible_host=10.11.12.13 ansible_ssh_user=root

  # Deploy:
  ansible-playbook -i hosts site.yml

  # Run it, but make it not change anything on the servers:
  ansible-playbook -i hosts site.yml --check
Wasn't so hard, was it?

comment 10y ago · link · parent

At least modern Android version support setting the CA certificate in the wifi settings.

(And then there's the university way of things: just run your own trusted (!) CA ;-) (e.g. in Germany: signed by DFN)

comment 10y ago · link · parent

1. You'd have install the custom CA in all devices. Ever tried it on Android? The "network may be monitored" warning doesn't go away.

2. If the certificate is ever compromised, you'll have to keep it in the revocation list forever, or replace the entire CA.

(And I hope your CA contains a DNS name restriction.)

comment 10y ago · link · parent

No, actually not.

"letsencrypt-auto renew" uses the same settings you've used with "letsencrypt-auto run/certonly". If you're using nginx, that's probably the --webroot method. Which works for renewals too.

comment 10y ago · link · parent

Stop spreading FUD: it does not "mess with all sorts of configuration".

_Renewal doesn't touch any config files at all._ "letsencrypt-auto" puts the certs/keys under /etc/letsencrypt/keys. On renewal, new files get added. Old files are never touched. /etc/letsencrypt/live contains symlinks to the most recent files. Your webserver config uses these => its config does not need to be changed for renewal.

What you're talking about is only the initial certificate installation with "letsencrypt-auto run", and it makes a very targeted change in your Apache config. Use etckeeper if you don't trust it. If you still don't want that, use "letsencrypt-auto certonly".

(Note on server restarts: It also supports multiple methods, one of which is the webroot method, with which letsencrypt-auto does the challenge by putting a file under .well-known/acme-challenge/ of your webroot and lets your webserver handle the request, so it doesn't need to restart/replace your webserver itself.)

And about all these "minimalistic tools": I've seen one that literally did "new-cert.sh > $cert-file". If it failed (e.g. due to ratelimit, no internet connectivity, ...), it would null your old cert! Written and used by very smug people.

comment 10y ago · link · parent

You're supposed to automate renewal.

Since v0.4.0 all it takes is a "letsencrypt renew && apachectl graceful" in a daily cronjob (or, preferably, systemd timer), it handles the rest. Tweak as you like.

comment 10y ago · link · parent

> Obviously some lawyer would make the case that it's not a new version since it has drastically different text,

That's exactly what I meant with lawyers<->nerds: publishing a radically different version is a nice hack, but may not hold up legally.

> but at that point we're well into moot, counterfactual realms.

That's what I meant with confusion. If the legal situation isn't entirely clear, the kernel team, distros and related companies might very well decide to play it safe.

comment 10y ago · link · parent

> So theoretically, they could release a CDDL license version 1.3 that has radically updated text in order to be GPL compatible. However, since that effects all CDDL licensed code, they would end up relicensing every bit of CDDL code (related to Oracle or not) in the entire world.

Though of course since laws are made by lawyers and not nerds, the new license may well be invalid and nothing would change at all except for lots of confusion.

Which makes you even more right.

comment 10y ago · link · parent

Also because they're their home countries. It's what they know and where their friends/family are.

And if you're rich enough that you can afford pretty much anything there, why would you move?

comment 10y ago · link · parent

ssh -o "PreferredAuthentications=password,keyboard-interactive" -o "UseRoaming=no" root@sshtron.zachlatta.com

Explanation:

Use a recent ssh version (if you've updated in February you're safe), or put in your .ssh/config file:

  # CVE-2016-0777
  UseRoaming no
Additionally, while you are at it, you can take care of some privacy problems. These are really not a big deal though.

Don't hand your SSH public key to the server:

  # Makes SSH not try other keys than ~/.ssh/id_{dsa/ecdsa/rsa}.
  IdentitiesOnly yes
  
  # And move ~/.ssh/id_{dsa/ecdsa/rsa}{,.pub} somewhere else,
  # including it on a per host basis:
  Host *.example.com example.com
    IdentityFile ~/.ssh/my_id_rsa
Or you could just disable pubkey authentication for this one connection with ssh -o "PreferredAuthentications=password,keyboard-interactive".

Including root@ prevents leaking your local username.

If in doubt, man ssh + man ssh_config (they contain other useful things like "CanonicalizeHostname yes / CanonicalDomains ycombinator.com" / example: ssh root@news).

(I don't know what's wrong with the internet that we need "how to SSH" posts now, though. But here it is.)

comment 10y ago · link · parent

https://en.wikipedia.org/wiki/Sentry_gun

Such as:

https://en.wikipedia.org/wiki/Samsung_SGR-A1

Quote:

"identify and shoot a target automatically from over two miles (3.2 km) away."

There are some scary videos of it on the internet.

comment 10y ago · link · parent

I do understand your point.

But as soon as scripting is supported, it's impossible to write tools that process the config files and always work, especially with untrusted config files. You can't have both.

So the question is: can code be separated from config (like I've proposed above) (the code can still be inlined in the config file, as long as the "root" of the config file is declarative and the boundaries are well-defined)?

If no, which is more important: parseability or flexibility? It's a tradeoff.

comment 10y ago · link · parent

I thought of HOCON, it's quite usable for users, but it's not a solution:

1. Lack of adption: It's not widely used yet. Implementations for few languages.

2. No formal spec; the "spec" is very imprecise and seems to try very hard to leave as much as possible to the implementation.

3. The spec is very, very Java specific. No clear separation between "core HOCON" and "Java extensions".

4. It probably doesn't lend itself well to automatic changes in a way that preserves structure of an original file (-> without just rendering out JSON).

It's clear that HOCONs only real focus is being easy to edit manually.

It's a nice idea, but it's definitely not the long term solution we need.

comment 10y ago · link · parent

> I think it would be better to just start with a Turing complete language. I think they should use Lua. .......... when you modify it with another program ...

No! Turing complete config files are even worse than ad-hoc config files.

If your config format is turing complete, you couldn't correctly modify config files automatically. (You wouldn't even know how long until you're done evaluating it.)

If you need more logic, put it in your program or have a plugin system or write a program that generates the config file, but don't put it in the config file.

comment 10y ago · link · parent

XML is too verbose for manual editing and I've yet to see an XML library that isn't cumbersome to use (compared to JSON). It's probably too complex, alright. But I'm convinced a simpler format could be specified.

But your complexity comparison is unfair. Ad-hoc file formats are overwhelming. Users don't see the complexity because there is no spec and they just write config files by example. Developers generally either give up or write something that doesn't behave quite the same. A fair comparison would be:

  """"
  XML looks like this:

  <section>
    <subsection>
      <key>value</key>
    </subsection>
  </section>
  """
That's about the level of detail in the documentation of most ad-hoc file formats I've seen. Followed by hundreds of examples that happen to show (but not specify) special cases.

comment 10y ago · link · parent

> What happens if I make a shell that does expansion slightly diffrently to the existing shells? That can't work well?

We have different shells with different expansions (and a myriad other differences) and it doesn't work well.

In practice, the result is that people write bash scripts, not shell scripts.

(Though they often don't know, and so use #!/bin/sh anyway, and so the scripts break whenever the default shell isn't bash.)

comment 10y ago · link · parent

On the other hand, the power shell version returns objects that can be manipulated in a safe way, whereas the find version relies on "-exec" being a feature of find (Talk about bloat.), which is string-based (if you're not extra careful: breaks with spaces/tabs/newlines/semicolons/dollars/backslahes/... depending on what you use it for) and spawns one process per file (really inefficient).

comment 10y ago · link · parent

Not all of us were around (as admins) in the 90s.

If it was bad then, and it still (after 20 years) hasn't improved, then what do you expect?

comment 10y ago · link · parent

Agreed, text based config files are good and not the problem. (Though binary formats != GUI tools only.)

I think the real problem is config files either in hard-to-parse-correctly custom ad-hoc formats or even "config files" written in a scripting language (-> impossible to parse).

All config files should use the same standard format. I'd say "like YAML", but I'm not aware of a widely-used format with standard features like file includes or data types beyond "int" and "string" (e.g. for time intervals; these really shouldn't be "just a string... with a custom format").

comment 10y ago · link · parent

> a nice advert in a magazine does exactly what is the intention: inform people of something, either a product or a service. And I can watch that ad anonymously.

Even ads in magazines aren't there to "inform" people.

"Informing" would be objective. Ads are meant to show the product in the best possible light and get people to buy them.

1
131415
20