diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2013-09-26 22:06:00 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2013-09-27 00:46:17 +0200 |
| commit | 8bc755c08c08577193291dc07013d48e25522aae (patch) | |
| tree | 470f0ade2b3abd0d96d2ad143e70744e236ad5d2 | |
| parent | 16a0e9dc3449fb9de699486ad6db2c0bc62b616b (diff) | |
gnu: vm: Add a 'guest' account.
* gnu/system/vm.scm (system-qemu-image): Add a "guest" user and a
"users" user group. Make /home/guest. Add /etc/group. Update
/etc/issue to mention it.
| -rw-r--r-- | gnu/system/vm.scm | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 48f008cff05..c4ca2e33437 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm | |||
| @@ -481,13 +481,24 @@ Happy birthday, GNU! http://www.gnu.org/gnu30 | |||
| 481 | (uid 0) (gid 0) | 481 | (uid 0) (gid 0) |
| 482 | (comment "System administrator") | 482 | (comment "System administrator") |
| 483 | (home-directory "/") | 483 | (home-directory "/") |
| 484 | (shell bash-file)) | ||
| 485 | (user-account | ||
| 486 | (name "guest") | ||
| 487 | (password "") | ||
| 488 | (uid 1000) (gid 100) | ||
| 489 | (comment "Guest of GNU") | ||
| 490 | (home-directory "/home/guest") | ||
| 484 | (shell bash-file)))) | 491 | (shell bash-file)))) |
| 485 | (passwd (passwd-file store accounts)) | 492 | (passwd (passwd-file store accounts)) |
| 486 | (shadow (passwd-file store accounts #:shadow? #t)) | 493 | (shadow (passwd-file store accounts #:shadow? #t)) |
| 487 | (group (group-file store | 494 | (group (group-file store |
| 488 | (list (user-group | 495 | (list (user-group |
| 489 | (name "root") | 496 | (name "root") |
| 490 | (id 0))))) | 497 | (id 0)) |
| 498 | (user-group | ||
| 499 | (name "users") | ||
| 500 | (id 100) | ||
| 501 | (members '("guest")))))) | ||
| 491 | (pam.d-drv (pam-services->directory store %pam-services)) | 502 | (pam.d-drv (pam-services->directory store %pam-services)) |
| 492 | (pam.d (derivation->output-path pam.d-drv)) | 503 | (pam.d (derivation->output-path pam.d-drv)) |
| 493 | 504 | ||
| @@ -522,7 +533,7 @@ This image features the GNU Guix package manager, which was used to | |||
| 522 | build it (http://www.gnu.org/software/guix/). The init system is | 533 | build it (http://www.gnu.org/software/guix/). The init system is |
| 523 | GNU dmd (http://www.gnu.org/software/dmd/). | 534 | GNU dmd (http://www.gnu.org/software/dmd/). |
| 524 | 535 | ||
| 525 | You can log in as 'root' with no password. | 536 | You can log in as 'guest' or 'root' with no password. |
| 526 | ")) | 537 | ")) |
| 527 | 538 | ||
| 528 | (populate `((directory "/etc") | 539 | (populate `((directory "/etc") |
| @@ -530,13 +541,15 @@ You can log in as 'root' with no password. | |||
| 530 | (directory "/var/run/nscd") | 541 | (directory "/var/run/nscd") |
| 531 | ("/etc/shadow" -> ,shadow) | 542 | ("/etc/shadow" -> ,shadow) |
| 532 | ("/etc/passwd" -> ,passwd) | 543 | ("/etc/passwd" -> ,passwd) |
| 544 | ("/etc/group" -> ,group) | ||
| 533 | ("/etc/login.defs" -> "/dev/null") | 545 | ("/etc/login.defs" -> "/dev/null") |
| 534 | ("/etc/pam.d" -> ,pam.d) | 546 | ("/etc/pam.d" -> ,pam.d) |
| 535 | ("/etc/resolv.conf" -> ,resolv.conf) | 547 | ("/etc/resolv.conf" -> ,resolv.conf) |
| 536 | ("/etc/profile" -> ,bashrc) | 548 | ("/etc/profile" -> ,bashrc) |
| 537 | ("/etc/issue" -> ,issue) | 549 | ("/etc/issue" -> ,issue) |
| 538 | (directory "/var/nix/gcroots") | 550 | (directory "/var/nix/gcroots") |
| 539 | ("/var/nix/gcroots/default-profile" -> ,profile))) | 551 | ("/var/nix/gcroots/default-profile" -> ,profile) |
| 552 | (directory "/home/guest"))) | ||
| 540 | (out (derivation->output-path | 553 | (out (derivation->output-path |
| 541 | (package-derivation store mingetty))) | 554 | (package-derivation store mingetty))) |
| 542 | (boot (add-text-to-store store "boot" | 555 | (boot (add-text-to-store store "boot" |
