:: Re: [DNG] The show goes on: “su” c…
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: KatolaZ
Fecha:  
A: Laurent Bercot
Cc: dng
Asunto: Re: [DNG] The show goes on: “su” command replacement merged into systemd on Fedora Rawhide
On Sat, Aug 29, 2015 at 04:38:33PM +0200, Laurent Bercot wrote:
> On 29/08/2015 14:43, Rainer Weikusat wrote:
> >'su' is not a concept, it's a program.
>
> <grumble> Okay, let's clarify.
> A program is the implementation of an idea. The idea is often
> unwritten or unspoken, or forgotten, and people will only refer
> to the implementation; but good design always starts with the idea,
> the concept, of what the program is supposed to do.
>
> When Lennart says "su is a broken concept", he's saying "the
> concept behind the su program is not clear or well-defined, and
> it was not a good idea to implement it"; and I agree with that.
> (Then he naturally branches onto his NIH obsession and decides
> that UNIX is bad and systemd must reinvent everything, which I
> obviously disagree with.)


Well, I wouldn't say that su is a broken concept on its own. In
assessing the quality of ideas and software one should always take
into account the motivations which led to a certain solution.

su appeared in AT&T Unix Version 1:

http://man.cat-v.org/unix-1st/1/su

and by reading the original manpage one realises that the rationale
for having such a command was quite understandable and sound: if you
alredy have a working session (and you are behind a teletype), and you
want to execute a few commands as root, there is no reason to logout,
login as root, execute the command, logout from root, login again on
your account. Nowadays it might seem to somebody a broken concept, but
that's just because they have in mind a different use case. And they
want to do more than su with something like su. After all, pens did
not become a "broken concept" when typewriters were invented...

The fact that we have gone a bit further than that with su, asking it
to do things it was not conceived for, is our problem, not su's one.
The "solution" proposed by systemd is (as usual) against the original
principles behind unix, since from the interface:

$ machinectl shell (16 characters)
$ su (2 characters)

Yes, they will say that with the former command you can do better,
smarter and more marvellous things, but if you just need to become
root to install one package, you would probably be better off with su
anyway.

HND

KatolaZ

--
[ Enzo Nicosia aka KatolaZ --- GLUG Catania -- Freaknet Medialab ]
[ me [at] katolaz.homeunix.net -- http://katolaz.homeunix.net -- ]
[ GNU/Linux User:#325780/ICQ UIN: #258332181/GPG key ID 0B5F062F ]
[ Fingerprint: 8E59 D6AA 445E FDB4 A153 3D5A 5F20 B3AE 0B5F 062F ]