Subject: Re: bug#33422: /etc/passwd on GuixSD can end up containing default home directories

From: Leo Famulari <[email-masked]>
Date: Sun, 18 Nov 2018 17:44:48 -0500

On Sun, Nov 18, 2018 at 11:05:26PM +0100, Ludovic Courtès wrote:
> On IRC, fps reported this issue: their user account was declared like
> this:
> 
> 26   (users (cons (user-account                              
> 27                 (name "fps")                              
> 28                 (comment "fps")                           
> 29                 (group "users")                           
> 30                 (supplementary-groups '("wheel" "netdev"  
> 31                                         "audio" "video")) 
> 32                 (home-directory "/home/bob"))    ;<--- notice “bob”!
> 
> … yet /etc/passwd would refer to /home/fps for user “fps” (this is on a
> fresh GuixSD 0.15.0 install.)
> 
> This in turn would prevent logging in as “fps” because /home/fps didn’t
> exist (meaning the ‘user-homes’ Shepherd service created /home/bob, not
> /home/fps.)

It slightly obscures a part of config.scm that is otherwise
straightforward, but I do this:

(home-directory (string-append "/home/" name))

... which would have avoided the issue. Maybe the value of
home-directory should be implicit when unspecified.

But, that is missing the point, which I think is that home directories
are not being handled in a consistent and unified way.