diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-06-22 22:16:14 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-06-22 22:16:14 +0200 |
commit | 773e956d5d5743c246f8e7199d9b43e4d32b403c (patch) | |
tree | 657e41daa490445dad552527704d0614a9bd8f59 | |
parent | 72507e23b5aeb6b0308d8c4db8d2286095b845ad (diff) | |
download | guix-773e956d5d5743c246f8e7199d9b43e4d32b403c.tar.gz |
system: Augment the default set of groups.
* gnu/system/shadow.scm (%base-groups): New variable. * gnu/system.scm (<operating-system>)[groups]: Use it as the default.
-rw-r--r-- | gnu/system.scm | 4 | ||||
-rw-r--r-- | gnu/system/shadow.scm | 23 |
2 files changed, 23 insertions, 4 deletions
diff --git a/gnu/system.scm b/gnu/system.scm index c2be74b6d5..41ea59b69b 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -92,9 +92,7 @@ (users operating-system-users ; list of user accounts (default '())) (groups operating-system-groups ; list of user groups - (default (list (user-group - (name "root") - (id 0))))) + (default %base-groups)) (skeletons operating-system-skeletons ; list of name/monadic value (default (default-skeletons))) diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm index 471390da61..fc19068ab6 100644 --- a/gnu/system/shadow.scm +++ b/gnu/system/shadow.scm @@ -42,7 +42,8 @@ user-group-id default-skeletons - skeleton-directory)) + skeleton-directory + %base-groups)) ;;; Commentary: ;;; @@ -71,6 +72,26 @@ (password user-group-password (default #f)) (id user-group-id (default #f))) +(define %base-groups + ;; Default set of groups. + (list (user-group (name "root") (id 0)) + (user-group (name "wheel")) ; root-like users + (user-group (name "users")) ; normal users + (user-group (name "nogroup")) ; for daemons etc. + + ;; The following groups are conventionally used by things like udev to + ;; control access to hardware devices. + (user-group (name "tty")) + (user-group (name "dialout")) + (user-group (name "kmem")) + (user-group (name "video")) + (user-group (name "audio")) + (user-group (name "lp")) + (user-group (name "disk")) + (user-group (name "floppy")) + (user-group (name "cdrom")) + (user-group (name "tape")))) + (define (default-skeletons) "Return the default skeleton files for /etc/skel. These files are copied by 'useradd' in the home directory of newly created user accounts." |