I have run into more problems than I can bother to count by changing my UID. I'm so frustrated that I'm just going to format and start all over again. This time, I want my installation to make the first user use, let's say UID 1200. I don't want to install Ubuntu and then create all the problems by changing my UID. I don't know how to fix all those problems & it's the reason why I'm formatting. I certainly am not going to be ever doing that mistake ever again on Ubuntu. I just want Ubuntu to install using a specific UID. How do I do it?
Method 1 - If you just want to create a user with a given UID
sudo adduser -u 1200 <username>
awk -F: '/\/home/ {printf "%s:%s\n",$1,$3}' /etc/passwd
sudo adduser <username> sudo
Method 2 - Automated Ubuntu installation using preseeding
In order to be able to define a UID range at installation time, you need to automate the Ubuntu installation using preseeding, which is basically
Using this method, which is way to extensive to be posted as part of this post, you can (amongst many other things) setup the account which will created at installation time. Example:
Notice the line:
If you want to learn more about automated installations there are several sources of useful information in the Internet. This is the official documentation currently:
https://help.ubuntu.com/lts/installation-guide/armhf/apbs01.html