From: "Ludovic Courtès" <ludo@gnu.org>
To: "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de>
Cc: 35996@debbugs.gnu.org
Subject: bug#35996: User account password got locked when booting old generation
Date: Sat, 01 Jun 2019 23:37:51 +0200 [thread overview]
Message-ID: <87r28dc7gw.fsf@gnu.org> (raw)
In-Reply-To: <20190601145834.f4wgm4oqmdyej7n5@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Sat, 1 Jun 2019 16:58:34 +0200")
Hi Florian,
"pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> skribis:
> On Sat, Jun 01, 2019 at 07:52:38AM +0200, pelzflorian (Florian Pelz) wrote:
>> I wonder what would change /etc/shadow.
>>
>
> If the error occurred on common non-Guix distros, it hopefully would
> have been fixed before, maybe. Of course Guix recreates /etc/shadow
> much more frequently.
Definitely.
> Guix appears to add shadow files atomically in gnu/build/accounts.scm.
> I do not know if there could have been an error reading the old shadow
> file, e.g. because it is locked or something?
(gnu build accounts) doesn’t care at all about /etc/.pwd.lock, the lock
file used by libc’s ‘lckpwdf’ function.
This is definitely not a problem when booting. It could be a problem if
you’re concurrently running ‘guix system reconfigure’ (which runs
activation snippets, including the account updating code) and some other
program, such as ‘passwd’, that assumes it holds an exclusive lock on
the file. Though in that case, the worst that could happen is that the
changes made by Guix would be undoed by that other program.
> The elogind source code in src/basic/user-util.c contains code for
> locking /etc/shadow, with a comment that explains why its lckpwdf is
> implemented differently from shadow-utils.
>
> AccountsService appears to only be usable for reading /etc/shadow, not
> for writing it, contrary to what the Guix manual claims (??).
That might be a bug.
> For writing passwords, gnome-control-center does not use
> AccountsService, it calls /usr/bin/passwd directly in its source code
> in panels/user-accounts/run-passwd.c.
That’s definitely a bug to fix: it should invoke
/run/setuid-programs/passwd instead.
Thanks for investigating,
Ludo’.
next prev parent reply other threads:[~2019-06-01 21:43 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-29 20:45 bug#35996: User account password got locked when booting old generation pelzflorian (Florian Pelz)
2019-05-31 22:05 ` Ludovic Courtès
2019-06-01 5:52 ` pelzflorian (Florian Pelz)
2019-06-01 14:58 ` pelzflorian (Florian Pelz)
2019-06-01 21:37 ` Ludovic Courtès [this message]
2019-06-02 7:05 ` pelzflorian (Florian Pelz)
2019-06-02 9:38 ` Ludovic Courtès
2019-06-02 10:21 ` pelzflorian (Florian Pelz)
2019-06-02 16:00 ` Ludovic Courtès
2019-06-03 6:03 ` pelzflorian (Florian Pelz)
2019-06-03 6:14 ` Gábor Boskovits
2019-06-03 7:18 ` pelzflorian (Florian Pelz)
2019-06-03 15:22 ` Ludovic Courtès
2019-06-03 17:07 ` pelzflorian (Florian Pelz)
2019-06-03 13:22 ` Ludovic Courtès
2019-06-03 14:52 ` pelzflorian (Florian Pelz)
2019-06-04 9:22 ` Ludovic Courtès
2019-06-04 12:17 ` pelzflorian (Florian Pelz)
2019-06-04 14:12 ` pelzflorian (Florian Pelz)
2019-06-04 17:17 ` pelzflorian (Florian Pelz)
2019-06-04 21:21 ` Ludovic Courtès
2019-06-05 6:16 ` pelzflorian (Florian Pelz)
2019-06-05 9:54 ` Ludovic Courtès
2019-06-05 11:06 ` pelzflorian (Florian Pelz)
2019-06-05 21:13 ` Ludovic Courtès
2019-06-06 7:01 ` pelzflorian (Florian Pelz)
2019-06-06 8:04 ` Ludovic Courtès
2019-06-03 16:01 ` Danny Milosavljevic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r28dc7gw.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=35996@debbugs.gnu.org \
--cc=pelzflorian@pelzflorian.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.