all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: guix-devel <guix-devel@gnu.org>
Subject: User accounts
Date: Tue, 13 May 2014 10:11:41 +0200	[thread overview]
Message-ID: <87d2fidrnm.fsf@gnu.org> (raw)

Before commit ab6a279, /etc/{group,passwd,shadow} were all created from
a derivation.  Thus, /etc contained symlinks to those files, which were
actually in the store.  Being in the store, they were all immutable and
world-readable (you can see that in the VM image released with 0.6.)

That was obviously not desirable, because then everyone can read shadow,
and because that prevents passwords from being changed.

So commit ab6a279 changed accounts to be created at “activation
time”—i.e., when booting, or when switching to a new operating system
configuration.  What happens is that the activation code checks for all
the user accounts and groups required by the ‘operating-system’
declaration, and invokes ‘useradd’ and ‘groupadd’ for any missing
account/group.

That way, {group,passwd,shadow} are normal state files with the right
permissions, and everything works as expected.  NixOS uses the same
strategy.

Ludo’.

             reply	other threads:[~2014-05-13  8:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-13  8:11 Ludovic Courtès [this message]
2014-05-13  8:17 ` User accounts John Darrington
2014-05-13 12:12   ` Ludovic Courtès
2014-05-13 12:49     ` John Darrington

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=87d2fidrnm.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    /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.