logo

blog

Unnamed repository; edit this file 'description' to name the repository.
commit 6f8ba001a9bad84a3976fc98923cfc3d4ca1789f
parent b416471d1e4497cef2f7d9210233535228b63c0b
Author: lanodan <haelwenn@NightGlider.the-delta.lan>
Date:   Sun, 27 Sep 2015 21:42:47 +0200

correct lang, add permalink

Diffstat:
articles/systemd-eated-su.html | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
articles/systemd-eated-su.shtml | 6+++---
2 files changed, 63 insertions(+), 3 deletions(-)

diff --git a/articles/systemd-eated-su.html b/articles/systemd-eated-su.html @@ -0,0 +1,60 @@ +<a href="/articles/systemd-eated-su"><h1>Lennart Poettering merged “su” command replacement into systemd: Test Drive on Fedora Rawhide</h1></a> +<p><a href="https://tlhp.cf/lennart-poettering-su/">“Original” Article</a></p> +<blockquote>Well, there have been long discussions about this, but the problem is that what "<code>su</code>" is supposed to do is very unclear. On one hand it's supposed to open a new session and change a number of execution context parameters (`<code>uid</code>`, `<code>gid</code>`, `<code>env</code>`, ...), and on the other it's supposed to inherit a lot concepts from the originating session (`<code>tty</code>`, `<code>cgroup</code>`, `<code>audit</code>`, ...). Since this is so weakly defined it's a really weird mix&amp;match of old and new paramters.</blockquote> +<p>Pretty clear, it ask for root or specified user password, launches a shell. If <code>-</code>, <code>-l</code>, <code>--login</code> is put it starts a new environement before starting the shell.</p> +<blockquote>To keep this somewhat managable we decided to only switch the absolute minimum over, and that excludes `XDG_RUNTIME_DIR`, specifically because `XDG_RUNTIME_DIR` is actually bound to the `session/audit` runtime and those we do not transition. Instead we simply unset it.</blockquote> +<p>Ah, of course desktop crap in the userland… And crappy explanation, maybe you should patent and copyreich that in case. ᕕ(ᐛ)ᕗ</p> +<blockquote><pre><code>$ cat /etc/os-release +NAME=Fedora VERSION="24 (Workstation Edition)" +ID=fedora +VERSION_ID=24 +PRETTY_NAME="Fedora 24 (Workstation Edition)" +ANSI_COLOR="0;34" +CPE_NAME="cpe:/o:fedoraproject:fedora:24" +HOME_URL="https://fedoraproject.org/" +BUG_REPORT_URL="https://bugzilla.redhat.com/" +REDHAT_BUGZILLA_PRODUCT="Fedora" +REDHAT_BUGZILLA_PRODUCT_VERSION=Rawhide +REDHAT_SUPPORT_PRODUCT="Fedora" +REDHAT_SUPPORT_PRODUCT_VERSION=Rawhide +PRIVACY_POLICY_URL=https://fedoraproject.org/wiki/Legal:PrivacyPolicy +VARIANT="Workstation Edition" +VARIANT_ID=workstation + +$systemctl --version +systemd 225 ++PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN</pre></code></blockquote> +<p>Okay here’s the same shit from a non voided system. Let’s share. ;D</p> +<pre><code> +% cat /etc/os-release +ID=gentoo +PRETTY_NAME="Gentoo/Linux" +ANSI_COLOR="1;32" +HOME_URL="http://www.gentoo.org/" +SUPPORT_URL="http://www.gentoo.org/main/en/support.xml" +BUG_REPORT_URL="https://bugs.gentoo.org/" +% rc --version +rc (OpenRC) 0.17 (Gentoo Linux) +</code></pre> +<p>Anyway, let’s continue</p> +<blockquote> +$ machinectl shell +Connected to the local host. Press ^] three times within 1s to exit session. +</blockquote> +<p>Okay even worse binding than Escape-Meta-Alt-Control-Shift(EMACS), fuck stty eof(^D), fuck POSIX, fuck quick and intuitive commands(shell for login, hell yeah), yes rude mode is activated.</p> +<blockquote> +It works! We can work as superuser. And isn’t end: we can also set shell and host: +<code>$ machinectl shell root@.host /bin/bash</code> +</blockquote> +<p>Wait… ssh is crap too? Why is there a dot before the host(maybe fuck localhost too…)?</p> +<blockquote> +Login as non-root user and set variable of shell environment: +<code>#1000 - UID of user `paul` +#SYSTEMD_TEST - test variable of user environment +$ machinectl shell --uid 1000 --setenv="SYSTEMD_TEST=777"</code> +</blockquote> +<p>’Kay so starting another $SHELL and export VAR=VARIABLE too ?</p> +<blockquote><code>$ sudo systemd-run -p CPUQuota=50% -p PAMName=login -t /bin/bash -c '/usr/bin/stress -c 4'</code></blockquote> +<p>Ah! So after saying cgroups is awesome… you goes with quota on the CPU… well maybe that’s called evolution… ? Why are you using login, you created machinectl for nothing? Why are you using -p options like a replacement to args… o_O<br\> +Well this command is full of fuck(not the very great program which among other thing uses… sudo with the last command :D)</p> +<p>I wonder when you will eat Emacs(meta-OS), build your own kernel because fuck UNIX so we can 🖖“live long an prosper” with (GNU/)Linux and BSD and you with SystemDOS.</p> diff --git a/articles/systemd-eated-su.shtml b/articles/systemd-eated-su.shtml @@ -1,16 +1,16 @@ <!DOCTYPE html> -<html> +<html lang="en"> <head> <!--#include file="/templates/head.shtml" --> <title>SystemD eated su — lanodan’s cyber-home</title> <link type="application/rss+xml" href="/feed" title="RSS feed" rel="alternate"></link> </head> <body> -<!--#include file="/templates/fr/nav.shtml" --> +<!--#include file="/templates/en/nav.shtml" --> <article> <!--#include file="/articles/systemd-eated-su.html"--> </article> <a href="/articles/systemd-eated-su.html">article only(plain HTML)</a> -<!--#include file="/templates/fr/footer.html" --> +<!--#include file="/templates/en/footer.html" --> </body> </html>