From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#21566: Bug when moving between system instances Date: Sat, 26 Sep 2015 22:21:36 +0200 Message-ID: <87612xylrj.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33656) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zfvyw-0003z3-OJ for bug-guix@gnu.org; Sat, 26 Sep 2015 16:22:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zfvys-0003Me-S3 for bug-guix@gnu.org; Sat, 26 Sep 2015 16:22:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:56238) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zfvys-0003MM-Oj for bug-guix@gnu.org; Sat, 26 Sep 2015 16:22:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Zfvys-000674-Ao for bug-guix@gnu.org; Sat, 26 Sep 2015 16:22:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: (goglosh@openmailbox.org's message of "Sat, 26 Sep 2015 03:21:23 +0000") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: goglosh@openmailbox.org Cc: 21566@debbugs.gnu.org goglosh@openmailbox.org skribis: > I got this unexpected behaviour. I used `guix system reconfigure ...` > to make a new system instance, used it for a while, and later booted > back into the old system. I used diferent names for the user in the > first and second system, let's call them sys1user and sys2user. I > booted into the old system and tried to login as sys1user (the user > created with that system) with it's password and this was no longer > possible. Yes, good point. I see how this may look confusing. When you boot a specific generation of the system, it gets to see only the set of users that were declared for that generation. So one sees =E2=80=98sys1user=E2=80=99 and =E2=80=98root=E2=80=99, and the other has = =E2=80=98sys2user=E2=80=99 and =E2=80=98root=E2=80=99. So when you booted the new generation, the =E2=80=98sys1user=E2=80=99 accou= nt was deleted and the =E2=80=98sys2user=E2=80=99 account was created. When you b= ooted again into the old generation, =E2=80=98sys1user=E2=80=99 was added back and =E2= =80=98sys2user=E2=80=99 was deleted. This is on purpose, see . Now, the problem is that passwords are state that is outside of GuixSD=E2= =80=99s control. Passwords are stored in /etc/shadow, and removing a user account removes its entry in /etc/shadow. This is why you would get uninitialized passwords when booting back in the old generation. I think this is an acceptable =E2=80=9Climitation=E2=80=9D of the approach = though. > I then rebooted back into the new system, only to find the exact same > problem. in /home/sys2user all files belonged to some user called > 30011. Same issue: Unless the =E2=80=98user-account=E2=80=99 declaration asked for= a specific user ID via the =E2=80=98uid=E2=80=99 field (see ), the UID is assigned when the account is first created. What happens here is that maybe =E2=80=98sys2user=E2=80=99 got the UID 3001= 1 at some point, and then got a different one. Again, I don=E2=80=99t thin there=E2=80=99s much that GuixSD can do here, b= ecause it doesn=E2=80=99t control what files are created under which UID in /home, et= c. Does that make sense? Thanks, Ludo=E2=80=99.