diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-04-24 21:54:28 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-04-25 00:45:35 +0200 |
commit | 91a7c4998fe4f5a2a63f2ddb4bfeeef81c68b6d7 (patch) | |
tree | b74d2da50fa8cf33a87f9db9be645f593a7e57ec /gnu/installer/user.scm | |
parent | 399c31d40a918343c5513c3c4a0351f60ec5797b (diff) | |
download | guix-91a7c4998fe4f5a2a63f2ddb4bfeeef81c68b6d7.tar.gz guix-91a7c4998fe4f5a2a63f2ddb4bfeeef81c68b6d7.zip |
installer: Ask for the root account password.
Fixes <https://bugs.gnu.org/35399>.
* gnu/installer/newt/user.scm (run-root-password-page): New procedure.
* gnu/installer/user.scm (users->configuration): Filter out the "root"
account.
* gnu/installer/final.scm (create-user-database): Set 'uid' field in
'user-account' form.
Diffstat (limited to 'gnu/installer/user.scm')
-rw-r--r-- | gnu/installer/user.scm | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/gnu/installer/user.scm b/gnu/installer/user.scm index fe755ad2c6..29fab6414e 100644 --- a/gnu/installer/user.scm +++ b/gnu/installer/user.scm @@ -18,6 +18,7 @@ (define-module (gnu installer user) #:use-module (guix records) + #:use-module (srfi srfi-1) #:export (<user> user make-user @@ -39,14 +40,18 @@ (define (users->configuration users) "Return the configuration field for USERS." + (define (user->sexp user) + `(user-account + (name ,(user-name user)) + (group ,(user-group user)) + (home-directory ,(user-home-directory user)) + (supplementary-groups '("wheel" "netdev" + "audio" "video")))) + `((users (cons* - ,@(map (lambda (user) - `(user-account - (name ,(user-name user)) - (group ,(user-group user)) - (home-directory ,(user-home-directory user)) - (supplementary-groups - (quote ("wheel" "netdev" - "audio" "video"))))) - users) - %base-user-accounts)))) + ,@(filter-map (lambda (user) + ;; Do not emit a 'user-account' form for "root". + (and (not (string=? (user-name user) "root")) + (user->sexp user))) + users) + %base-user-accounts)))) |