unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Oleg Pykhalov <go.wigust@gmail.com>
To: 32273@debbugs.gnu.org
Subject: bug#32273: home-directory produces wrong /etc/passwd
Date: Wed, 25 Jul 2018 23:09:00 +0300	[thread overview]
Message-ID: <87r2jrnkmb.fsf@gmail.com> (raw)

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

Hello Guix,

I've added a guix-offload user to my system, because I've found that
‘~/.guile’ with following content break ‘guix offload’.
--8<---------------cut here---------------start------------->8---
(use-modules (ice-9 readline))

;; Enable completion at the REPL.
(activate-readline)

;; Colorize
(use-modules (ice-9 colorized))
(activate-colorized)

(define-macro (try function)
  `(catch 'quit (lambda () ,function) (const #f)))
--8<---------------cut here---------------end--------------->8---

I choose a ‘/var/run/guix-offload’ for guix-offload's home directory:
--8<---------------cut here---------------start------------->8---
(operating-system
  (groups (cons* …
                 (user-group (name "guix-offload"))
                 %base-groups))

  (users (cons* …
                (user-account
                 (name "guix-offload")
                 (uid 1982)
                 (group "guix-offload")
                 (home-directory "/var/run/guix-offload"))
                %base-user-accounts))
  …
)
--8<---------------cut here---------------end--------------->8---

but I cannot login to ‘guix-offload’ user with ‘sudo -u guix-offload -i’:
--8<---------------cut here---------------start------------->8---
sudo: unable to change directory to /home/guix-offload: No such file or directory
sudo: unable to execute /gnu/store/q4b3s9y4i0da36drp7zfq9yqcf43s47v-bash-4.4.19/bin/bash: No such file or directory
--8<---------------cut here---------------end--------------->8---

and a ‘getent’ program confirms home directory is wrong:
--8<---------------cut here---------------start------------->8---
natsu@magnolia ~$ getent passwd guix-offload
guix-offload:x:1982:30002::/home/guix-offload:/gnu/store/q4b3s9y4i0da36drp7zfq9yqcf43s47v-bash-4.4.19/bin/bash
--8<---------------cut here---------------end--------------->8---


Choosing ‘(home-directory "/home/guix-offload")’ is a workaround.

Oleg.

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

             reply	other threads:[~2018-07-25 20:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-25 20:09 Oleg Pykhalov [this message]
2018-11-23 13:33 ` bug#32273: home-directory produces wrong /etc/passwd Ludovic Courtès

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r2jrnkmb.fsf@gmail.com \
    --to=go.wigust@gmail.com \
    --cc=32273@debbugs.gnu.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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).