unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Jacob First <jacob.first@member.fsf.org>
To: 52539@debbugs.gnu.org
Subject: bug#52539: Fwd: Comments in /etc/passwd don't get updated
Date: Mon, 20 Dec 2021 23:45:47 +0000	[thread overview]
Message-ID: <CAAkdc5BuMRSx4tsaMQNu_dW_46TtpXmjatezquD0CAsq7Pfcfw@mail.gmail.com> (raw)
In-Reply-To: <8e7f7b1988602bad8d0adf06944726545200800a.camel@gmail.com>

Changing the shell indeed causes the comment to be updated.

If lazy update is the correct behavior, then the docs about user
accounts are a bit misleading:

"When booting or upon completion of guix system reconfigure, the
system ensures that only the user accounts and groups specified in the
operating-system declaration exist, and with the specified properties.
Thus, account or group creations or modifications made by directly
invoking commands such as useradd are lost upon reconfiguration or
reboot. This ensures that the system remains exactly as declared."

As a user it would be helpful to know from the docs that some of the
fields actually persist across reboots/reconfigurations.

Thanks for the workaround in any case!

On Fri, Dec 17, 2021 at 4:02 AM Liliana Marie Prikler
<liliana.prikler@gmail.com> wrote:
>
> Hi,
>
> Am Donnerstag, dem 16.12.2021 um 07:00 +0000 schrieb Jacob First:
> > In my Guix system's /etc/passwd file, my user named "abc" has a
> > comment attached to it. The relevant line is:
> >
> >     abc:x:1000:998:Old
> > Comment:/home/jkf:/gnu/store/71yp1p06jy2j96bfdz43f4p6ncdym5a1-zsh-
> > 5.8/bin/zsh
> >
> > Today the users section of my current config.scm looks like this:
> >
> >     (users (cons* (user-account
> >                     (name "abc")
> >                     (group "users")
> >                     (comment "New Comment")
> >                     (supplementary-groups '("wheel"
> >                                             "netdev"
> >                                             "audio"
> >                                             "video"
> >                                             "disk"
> >                                             "cdrom"
> >                                             "docker"
> >                                             "libvirt"
> >                                             "kvm"))
> >                     (shell #~(string-append #$zsh "/bin/zsh")))
> >                    %base-user-accounts))
> >
> > After I apply this configuration with `guix system reconfigure', I
> > expect /etc/passwd to have been updated with "New Comment" in place
> > of "Old Comment". However, "Old Comment" remains.
> >
> > Similarly, if I omit the `comment' field entirely, I expect my user
> > comment to be removed from /etc/passwd, since the default value of
> > the `comment' field is documented to be an empty string (manual
> > 10.6). Again, the old comment remains.
> >
> > I am reporting this on a recent Guix version cev9c6c5, but have
> > noticed this issue for a year at least.
> What if you were to temporarily change your login shell to let's say
> bash?  IIRC, Guix is quite lazy when it comes to updating these values,
> but a change in the shell ought to get them revised.  I think the
> reason behind it is that it doesn't want to lock you out by messing
> with the password field, but that's a little unrelated here.
>
> Cheers
>




  reply	other threads:[~2021-12-20 23:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAAkdc5CeSKJh8h1qvwX8fiDNS2rjXyr-4qWPEU0ZBy4+FZTDoQ@mail.gmail.com>
2021-12-16  7:00 ` bug#52539: Fwd: Comments in /etc/passwd don't get updated Jacob First
2021-12-17  4:02   ` Liliana Marie Prikler
2021-12-20 23:45     ` Jacob First [this message]
2021-12-22 22:36   ` Ludovic Courtès
2021-12-26 21:56     ` Jacob First
2021-12-31 17:32       ` Ludovic Courtès
     [not found]   ` <handler.52539.D52539.164097194432533.notifdone@debbugs.gnu.org>
2022-01-01 14:22     ` 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=CAAkdc5BuMRSx4tsaMQNu_dW_46TtpXmjatezquD0CAsq7Pfcfw@mail.gmail.com \
    --to=jacob.first@member.fsf.org \
    --cc=52539@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).