Can I use the same username when installing a new version of LM and keep my files?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can I use the same username when installing a new version of LM and keep my files?
hi,
I am currently on linux mint 20.2. I will install linux mint 21.2 victoria.
My quesion is during the installation where it is asking to create a user, can I use the same user name 'dave' from linux mint 20? And if I use the same user name 'dave' will all my files and config files still be there in /home/dave? or will it erase everything?
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,503
Rep:
If your /home is on a separate partition, yes, providing the installer will let you use a ready formatted /home.
Otherwise, a new installation will most likely overwrite the whole disk - (you should really have a back up on external media of all your personal files).
Can you not just upgrade your installed operating system(?).
As fatmac explained, a current separate filesystem for your /home/ can be preserved for use with a new installation. What follows assumes that a separate /home/ is what you currently have, and that you do in fact preserve it's use with the new installation.
Take a gander at your own home directory and you should see something similar to the following:
Code:
# inxi -S
System:
Host: p5bse Kernel: 5.15.0-78-generic arch: x86_64 bits: 64
Console: pty pts/0 Distro: Linux Mint 21.2 Victoria
# ls -an /home/firefox/
total 40
drwxrwxr-x 20 1060 100 1024 Jun 2 2019 .
drwxr-xr-x. 20 0 0 8192 Jun 29 16:35 ..
-rw------- 1 1060 100 0 Oct 23 2014 .ICEauthority
-rw------- 1 1060 100 0 Oct 23 2014 .Xauthority
-rw------- 1 1060 100 477 Jun 2 2019 .bash_history
drwx------ 3 1060 100 1024 Dec 30 2012 .cache
drwx------. 9 1060 100 1024 Jun 2 2019 .config
drwx------ 3 1060 100 1024 Dec 30 2012 .dbus
-rw------- 1 1060 100 22 Oct 23 2014 .dmrc
-rw------- 1 1060 100 16 Dec 30 2012 .esd_auth
drwxr-xr-x 2 1060 100 1024 Aug 5 2013 .gstreamer-1.0
drwxr-xr-x 3 1060 100 1024 Dec 30 2012 .local
drwxr-xr-x 3 1060 100 1024 Aug 4 2013 .mc
drwxr-xr-x 3 1060 100 1024 Aug 14 2013 .mcop
drwx------ 2 1060 100 1024 Aug 5 2013 .pulse
drwxrwxr-x 2 1060 100 1024 Sep 13 2013 .skel
-rw------- 1 1060 100 0 Oct 23 2014 .xsession-errors
drwxr-xr-x 2 1060 100 1024 Sep 13 2013 Desktop
drwxr-xr-x 2 1060 100 1024 Aug 4 2013 Documents
drwxr-xr-x 2 1060 100 1024 Dec 31 2012 bin
Files and directories here are actually owned by user 1060 who is a member of group 100. The password management system associates 1060 with a username, and 100 with a group name. If on installation your use of dave fails to result in all your old data being visibly present in your new homedir, it would be because the installer assigned dave to a different number and/or group. That can be changed if necessary with useradd/userdel and groupadd/groupdel:
Code:
# which groupadd
/usr/sbin/groupadd
# which groupdel
/usr/sbin/groupdel
# which useradd
/usr/sbin/useradd
# which userdel
/usr/sbin/userdel
Odds are your current user dave is user 1000 and belongs to group named users assigned 100, and this would happen again with a new installation.
If your /home is on a separate partition, yes, providing the installer will let you use a ready formatted /home.
Otherwise, a new installation will most likely overwrite the whole disk - (you should really have a back up on external media of all your personal files).
Can you not just upgrade your installed operating system(?).
I tried that first. the update manager doesn't have Linux Mit 21.2 listed in the Edit menu. I need mintupdate (6.0.3 or higher). My current version after doing apt update is vesion 5.8.4.
Quote:
Originally Posted by mrmazda
As fatmac explained, a current separate filesystem for your /home/ can be preserved for use with a new installation. What follows assumes that a separate /home/ is what you currently have, and that you do in fact preserve it's use with the new installation.
Take a gander at your own home directory and you should see something similar to the following:
Code:
# inxi -S
System:
Host: p5bse Kernel: 5.15.0-78-generic arch: x86_64 bits: 64
Console: pty pts/0 Distro: Linux Mint 21.2 Victoria
# ls -an /home/firefox/
total 40
drwxrwxr-x 20 1060 100 1024 Jun 2 2019 .
drwxr-xr-x. 20 0 0 8192 Jun 29 16:35 ..
-rw------- 1 1060 100 0 Oct 23 2014 .ICEauthority
-rw------- 1 1060 100 0 Oct 23 2014 .Xauthority
-rw------- 1 1060 100 477 Jun 2 2019 .bash_history
drwx------ 3 1060 100 1024 Dec 30 2012 .cache
drwx------. 9 1060 100 1024 Jun 2 2019 .config
drwx------ 3 1060 100 1024 Dec 30 2012 .dbus
-rw------- 1 1060 100 22 Oct 23 2014 .dmrc
-rw------- 1 1060 100 16 Dec 30 2012 .esd_auth
drwxr-xr-x 2 1060 100 1024 Aug 5 2013 .gstreamer-1.0
drwxr-xr-x 3 1060 100 1024 Dec 30 2012 .local
drwxr-xr-x 3 1060 100 1024 Aug 4 2013 .mc
drwxr-xr-x 3 1060 100 1024 Aug 14 2013 .mcop
drwx------ 2 1060 100 1024 Aug 5 2013 .pulse
drwxrwxr-x 2 1060 100 1024 Sep 13 2013 .skel
-rw------- 1 1060 100 0 Oct 23 2014 .xsession-errors
drwxr-xr-x 2 1060 100 1024 Sep 13 2013 Desktop
drwxr-xr-x 2 1060 100 1024 Aug 4 2013 Documents
drwxr-xr-x 2 1060 100 1024 Dec 31 2012 bin
Files and directories here are actually owned by user 1060 who is a member of group 100. The password management system associates 1060 with a username, and 100 with a group name. If on installation your use of dave fails to result in all your old data being visibly present in your new homedir, it would be because the installer assigned dave to a different number and/or group. That can be changed if necessary with useradd/userdel and groupadd/groupdel:
Code:
# which groupadd
/usr/sbin/groupadd
# which groupdel
/usr/sbin/groupdel
# which useradd
/usr/sbin/useradd
# which userdel
/usr/sbin/userdel
Odds are your current user dave is user 1000 and belongs to group named users assigned 100, and this would happen again with a new installation.
Yes, I do have have my /home folder on a separate partition. I also know that I need to uncheck format on the /home partition.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.