|
|
Log in / Subscribe / Register

probably not a huge deal, but bigger implications

probably not a huge deal, but bigger implications

Posted Jun 23, 2025 21:35 UTC (Mon) by wtarreau (subscriber, #51152)
In reply to: probably not a huge deal, but bigger implications by parametricpoly
Parent article: GNOME deepens systemd dependencies

> GECOS is such a stinking pile of garbage, no wonder most users doesn't use it at all.

And what's the next step ? Drop support for /etc/passwd and /etc/shadow and force users to use yet another GNOME mega-application to edit an entry from the local console ? Have them run an imitation of regedit to change their UID ? We're progressively but surely going away from the KISS principle that has made UNIX-based systems last 5 decades, and slowly turning them into a single megalith that nobody understands and that newcomers will denounce as the pest to combat like windows was pointed the finger at 25 years ago. We might reach a point where the stuff will have become so complex and boring that nobody will want to hack on it anymore and it will die by itself in boredom.


to post comments

probably not a huge deal, but bigger implications

Posted Jun 23, 2025 23:39 UTC (Mon) by parametricpoly (subscriber, #143903) [Link]

The article clearly stated the problem. There's a need to convey extra metadata related to the user. That field is a time capsule to 1960s. What would be your solution?

probably not a huge deal, but bigger implications

Posted Jun 24, 2025 0:32 UTC (Tue) by pizza (subscriber, #46) [Link]

> Drop support for /etc/passwd and /etc/shadow

You say that as if it's a bad thing.

In the real world, requiring all processes performing authentication to (1) run as root and (2) work with plaintext credentials is both (i) a major security weakness (that has been exploited countless times) and (ii) severely limits the sorts of authentication mechanisms one can use.

> We're progressively but surely going away from the KISS principle that has made UNIX-based systems last 5 decades, and slowly turning them into a single megalith that nobody understands and that newcomers will denounce as the pest to combat like windows was pointed the finger at 25 years ago.

User info and authentication hasn't been obtained directly from /etc/passwd(etc) since Unix System V Release 4 in *1988*, instead proxying through the libc's NSS to allow for NIS and other directory services to be transparently used. This was later augmented by PAM (1996) and SSSD (mid-late 2000s), which in turn could be plugged into countless other user authentiction/directory services.

"KISS" ended nearly 40 years ago, out of the necessity of working in the real world.

probably not a huge deal, but bigger implications

Posted Jun 24, 2025 2:10 UTC (Tue) by smurf (subscriber, #17840) [Link]

> And what's the next step ? Drop support for /etc/passwd and /etc/shadow

Lots of places already did. Did you ever try to edit /etc/passwd when the name displayed by your company's Active Directory server was wrong?

systemd's user info server isn't yet another huge thing you need tooling for. It's mainly an aggregator. You can plug a parser for /etc/passwd+shadow into it, or AD, or whichever other service you want. It's a protocol, not an API or (worse) a file format from the 70s/90s that can't evolve and can't be extended. There's strict separation of concerns (in contrast to libpam and related ugliness).

probably not a huge deal, but bigger implications

Posted Jun 24, 2025 3:03 UTC (Tue) by mjg59 (subscriber, #23239) [Link] (5 responses)

If your expectation is that you can look up a user in /etc/passwd then that hasn't been true for decades - even if we choose to ignore NIS as a Sun special, Project Athena had come up with Hesiod in the 80s, and modern enterprise environments are almost certainly using some form of LDAP (either natively or via Active Directory). At some point it becomes necessary to consider whether continuing to apply bodges on top of the existing infrastructure ("Your password is here, unless it isn't, in which case you need to know which backend to query to find it") is genuinely simpler than replacing it with unified tooling that caters to the modern world rather than one which envisaged managing hostnames by just having people mail out updates to /etc/hosts

probably not a huge deal, but bigger implications

Posted Jun 24, 2025 6:35 UTC (Tue) by joib (subscriber, #8541) [Link] (4 responses)

There was also some effort by the sssd people some years ago to provide a dbus service to query also local users in some unified way and provide more info than possible with NSS&PAM, but seems it never went anywhere and support was eventually ripped out from the codebase.

So now systemd is trying the same. Will it allow some unification and simplification, or the opposite if applications will need to support that in addition to classical NSS&PAM along with some ad-hoc kludge to provide more info if necessary, and the sssd thing if that was ever supported? I guess one can only try and hope it gains more or less universal adoption, but there's a risk this will just increase complexity rather than reduce it.

probably not a huge deal, but bigger implications

Posted Jun 24, 2025 7:43 UTC (Tue) by smurf (subscriber, #17840) [Link]

> provide a dbus service

The problem with dbus is (a) its access rights model, which is surprisingly complex and a source of subtle security errors, (b) libdbus isn't exactly easy to integrate, (c) hey now your passwords pass through yet another daemon what could possibly go wrong.

systemd has a plugin for PAM, so your the legacy(-ish) tooling will continue to work. The other way 'round, there's the io.systemd.Machine provider.

probably not a huge deal, but bigger implications

Posted Jun 24, 2025 14:20 UTC (Tue) by rjones (guest, #159862) [Link] (2 responses)

I've always just used 'getent' to look up users and groups.

This leverages nss and thus works regardless of what service is sourcing the id numbers for these things. This includes the systemd dynamic uids, which is also exposed via nss with the nss-systemd module.

Cat your /etc/nsswitch.conf to confirm. You should see 'systemd' listed there after files, etc

I don't think there is anything special that applications need to do to support anything at this point. Even if /etc/passwd was to magically disappear.

probably not a huge deal, but bigger implications

Posted Jun 24, 2025 14:53 UTC (Tue) by joib (subscriber, #8541) [Link] (1 responses)

NSS, despite its architectural shortcomings, roughly does what it was designed for, and support for it is indeed near universal, from things like getent to the various user/group querying APIs in libc that applications use to look up info.

Problem here seems to be a desire to associate additional info to a user, not possible in the NSS data model. Like a picture of the user, email address, fully qualified username (name@DOMAIN), etc. Sssd having a go at this failed, remains to be seen whether the systemd approach will turn out to be more successful.

probably not a huge deal, but bigger implications

Posted Jun 25, 2025 11:07 UTC (Wed) by rjones (guest, #159862) [Link]

Oh, well that make sense.

Took a quick look at JSON Group Record and JSON User record from Systemd's documentation it all seems very reasonable and not any different then what people have already been doing for decades with LDAP.

It would be nice to have a nice way for users to set their picture, email address, timezone, default language, security keys, etc. in a saner manner. None of that seems crazy or undesirable.

And since systemd-userdb provides support for multiple backends then it can provide a unified interface for retrieving and interacting with LDAP and other sources of user information people already use and rely on while systemd-homed provides feature parity for people not using any of those services.

If it all works out then it should represent a nice improvement and simplification of the OS over the status quo.

probably not a huge deal, but bigger implications

Posted Jun 24, 2025 7:16 UTC (Tue) by zdzichu (subscriber, #17118) [Link] (2 responses)

I vaguely remember some distributions dropping /etc/passwd. The replacement was a directory tree somewhere in /etc, each user-representing directory owned by that user. Inside were files for metadata like real name, a symlink to the shell etc.

I can't find it now, but Openwall's TCB (https://www.openwall.com/tcb/) looks similar. Or maybe that was something from GoboLinux? Or maybe T2 SDE? Nevertheless, life without /etc/{passwd,shadow} is possible and even quite pleasant.

probably not a huge deal, but bigger implications

Posted Jun 24, 2025 10:01 UTC (Tue) by dottedmag (subscriber, #18590) [Link]

It was ALT Linux probably, it uses TCB.

probably not a huge deal, but bigger implications

Posted Jun 24, 2025 18:15 UTC (Tue) by adobriyan (guest, #30858) [Link]

This is likely to make updates non-atomic.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds