From eb56ee027b4c6b5682f69fa885d16e55c4495bd8 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 28 Aug 2016 12:53:20 +0200 Subject: system: Add 'create-home-directory?' field to . * gnu/system/shadow.scm ()[create-home-directory?]: New field. (user-account->gexp): Serialize it. * gnu/build/activation.scm (activate-users+groups)[activate-user]: Update 'match-lambda' pattern accordingly. Pass #:create-home? to 'ensure-user'. (add-user, modify-user, ensure-user): Add #:create-home? parameter and honor it. * doc/guix.texi (User Accounts): Document it. --- gnu/system/shadow.scm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gnu/system/shadow.scm') diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm index c3948900eb..6a4063529c 100644 --- a/gnu/system/shadow.scm +++ b/gnu/system/shadow.scm @@ -78,6 +78,8 @@ (define-record-type* (default '())) ; list of strings (comment user-account-comment (default "")) (home-directory user-account-home-directory) + (create-home-directory? user-account-create-home-directory? ;Boolean + (default #t)) (shell user-account-shell ; gexp (default #~(string-append #$bash "/bin/bash"))) (system? user-account-system? ; Boolean @@ -255,6 +257,7 @@ (define (user-account->gexp account) #$(user-account-supplementary-groups account) #$(user-account-comment account) #$(user-account-home-directory account) + #$(user-account-create-home-directory? account) ,#$(user-account-shell account) ; this one is a gexp #$(user-account-password account) #$(user-account-system? account))) -- cgit v1.2.3 From d03db7434b5b2f1e588c65805d38faea973c3cf0 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 28 Aug 2016 12:56:48 +0200 Subject: system: Do not create the home directory of "nobody". Fixes . Reported by John Darrington . * gnu/system/shadow.scm (%base-user-accounts): Add (create-home-directory? #f) for "nobody". --- gnu/system/shadow.scm | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/system/shadow.scm') diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm index 6a4063529c..cfdcf5e136 100644 --- a/gnu/system/shadow.scm +++ b/gnu/system/shadow.scm @@ -130,6 +130,7 @@ (define %base-user-accounts (group "nogroup") (shell #~(string-append #$shadow "/sbin/nologin")) (home-directory "/nonexistent") + (create-home-directory? #f) (system? #t)))) (define (default-skeletons) -- cgit v1.2.3