all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Giovanni Biscuolo <g@xelera.eu>
To: Raghav Gururajan <raghavgururajan@disroot.org>, help-guix@gnu.org
Subject: Re: Passwords inside System Configuration
Date: Mon, 20 Jan 2020 10:31:13 -0000 (UTC)
Date: lun, 20 gen 2020 11:30:19 +0100	[thread overview]
Message-ID: <87zheipghw.fsf@roquette.mug.biscuolo.net> (raw)
In-Reply-To: <f52189f5f72be6192af101bd638d5359@disroot.org>

[-- Attachment #1: Type: text/plain, Size: 1628 bytes --]

Hello Raghav, 

"Raghav Gururajan" <raghavgururajan@disroot.org> writes:

> Hello Guix!
>
> I would like to insert/set password for the following, inside system configuration (config.scm):
> 1) Roor User
> 2) Regular User

--8<---------------cut here---------------start------------->8---
(user-account
  (name "charlie")
  (group "users")

  ;; Specify a SHA-512-hashed initial password.
  (password (crypt "InitialPassword!" "$6$abc")))
--8<---------------cut here---------------end--------------->8---

but please read
https://guix.gnu.org/manual/en/html_node/User-Accounts.html#user_002daccount_002dpassword

--8<---------------cut here---------------start------------->8---
You would normally leave this field to #f, initialize user passwords as
root with the passwd command, and then let users change it with
passwd. Passwords set with passwd are of course preserved across reboot
and reconfiguration.

[...]

Note: The hash of this initial password will be available in a file in
/gnu/store, readable by all the users, so this method must be used with
care.

--8<---------------cut here---------------end--------------->8---

> 3) LUKS Device

AFAIK it's not possible to provide the passphrase in the system
configuration, and it's by design :-)

I mean: you set the LUKS passphrase "imperatively" when encrypting the
device (e.g. during installation) or to change it later, storing it in
config.scm would mean to make it available in /gnu/store, readeable by
all users... and you should avoid it

[...]


HTH! Gio'

-- 
Giovanni Biscuolo

Xelera IT Infrastructures

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2020-01-20 10:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-19 11:20 Passwords inside System Configuration Raghav Gururajan
2020-01-20 10:31 ` Giovanni Biscuolo [this message]
2020-01-21 20:45   ` Raghav Gururajan
2020-01-21 21:24     ` Vagrant Cascadian
2020-01-23  1:36       ` Raghav Gururajan
2020-01-24 20:53     ` Giovanni Biscuolo
2020-01-25  0:34       ` Raghav Gururajan

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=87zheipghw.fsf@roquette.mug.biscuolo.net \
    --to=g@xelera.eu \
    --cc=help-guix@gnu.org \
    --cc=raghavgururajan@disroot.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.