This is tutorial or kind of summary of my thread of Agama booting from master boot record 2)adding users
These informations are based mainly on comments of @hcvv and @OrsoBruno
issue/topic
-the installation process until leap 15.6 had the chance to “import existing users” when you format your / partition and reuse your existing /home partition without formatting it. But leap 16.0 and installer agama doesn’t offer this.
-until leap 15.6 I would have used yast user management to add the users.
-This may in leap 16.0 be done with tools like Cockpit (which is the new management tool) or command line.
But the problem is that these gui tools will create a new user with an unchangeable User-ID UID. That can be problem because your already existing user(s) in /home e.g. /home/user1 have the special rights and ownership. But when e.g. Cockpit uses randomly the UID 1001 and your already existing user with that name in /home/user1 used 1002 in the past, it won’t work. Therefore we will use the “useradd” command because we can specicy the UID as a parameter, so it is not kind of randomly set.
-Following, I will describe what worked for me when with /home users coming from lea15.6 and earlier versions. There may be other constellations. Please consider the original post (link above). If there is no answer to your question, please write a comment to this thread below afterwards.
requirement
Now we assume you’re on your leap-15.6 installation.
-make a backup of your /home drive.
-also make a backup of your /etc/passwd and /etc/group
-if your /etc/passwd is in the format
"user:x:1001:100:user:/home/user:/bin/bash" - the “old format” - you can follow the instructions. If otherwise consider the original posting above. You could also do this via
cat /etc/passwd |grep -E "user1" with user1 as your username
-that should show something like
user1:x:1000:100:User1:/home/user1:/bin/bash etc., showing that user1 has UID=1000, Group ID GID=100 etc.
-If you didn’t had the chance to backup your /etc/passwd, on my opinion you can assume a UID. Probably you have other computers running on leap 15.6 which aren’t migrated to leap 16 and you can check it there. Typical the first user which was created gets the UID 1000, the second user UID 1001, the third user UID 1002 and so on. You propbably remember the order. And then give it a try by assuming it may be the UID 1001 for example.
solution
1)If your first user (UID 1000) in leap-15.6 was a “installuser” or similar, then its fine setting in the new installer with the name Agama this username and it’s password as the “first user”. Skip step 2 in this case.
Otherwise if your first (UID 1000) is someone different, consider not defining any new user. Just define a root password. Because otherwise the UID 1000 will be reserved and is not available for your already existing users. You may getting problems then.
2a)after the first reboot, go to a Virtual Terminal (CTRL+ALT+F4, for instance) and login as root
at this point I would keep the existing users on the “old default” to avoid permission problems with their existing ~homes and files, so issue:
useradd -u 1000 -g 100 -G wheel -m user1
With that you re-create user1:users with /home/user1/ as an administrative account (wheel); if user1/UID=1000 is not “you” (as a system administrator) adjust username/UID accordingly;
2b)type as root “passwd user1” in order to set the initial password for this user. The program will requests you to type in the new password two times.
2c)type in “reboot” to restart your computer.
3)Now the GUI / graphical graphical login screen shows you the new user (user1). Login. and even do further admin work from there
4)Then re-create the other users like the next steps a) and b) for every user:
4a)open the terminal. switch to superuse via “su” and type in “useradd -u 1001 -g 100 -m user2” etc. (be careful matching username and UID as per your previous printout from /etc/passwd);
4b)type again “passwd user2” in order to set the initial password.
5) At this point also the other users should be able to login and find their files where they left them. If not so, write here for help
You can try to login and change and save an existing text file for example.
If any user belongs to important additional groups you may add a corresponding -G groupxxat user creation, or adding via cockpit-accounts once the system is up and running.
On my opinion, steps 4a) and 4b) could have also be done after step 2b)
Greetings