• can't access old files after new Ubuntu install

    From Adam@adam@no_thanks.com to alt.os.linux.ubuntu on Sat Mar 27 10:36:45 2021
    From Newsgroup: alt.os.linux.ubuntu


    Installed new Ubuntu (/) wiping out old Ubuntu (/) partition.
    Kept old Ubuntu /home partition.

    New Ubuntu install went according to plan except with regards to /home partition.

    Now I believe I have an ownership issue because
    I can't access files from old Ubuntu /home partition (owned by different username).

    GParted shows /home is decently full as expected.
    Just can't access files in old Ubuntu /home partition.

    How to fix ?
    --- Synchronet 3.18a-Linux NewsLink 1.113
  • From Naird Owell@naird@owell.invalid to alt.os.linux.ubuntu on Sat Mar 27 20:04:22 2021
    From Newsgroup: alt.os.linux.ubuntu

    Adam wrote:

    Installed new Ubuntu (/) wiping out old Ubuntu (/) partition.
    Kept old Ubuntu /home partition.

    New Ubuntu install went according to plan except with regards to /home partition.

    Now I believe I have an ownership issue because
    I can't access files from old Ubuntu /home partition (owned by different username).

    GParted shows /home is decently full as expected.
    Just can't access files in old Ubuntu /home partition.

    How to fix ?


    Maybe...

    <https://devconnected.com/how-to-chown-recursive-on-linux/>

    <https://serverfault.com/questions/156437/how-to-chown-a-directory-recursively-including-hidden-files-or-directories>




    --- Synchronet 3.18a-Linux NewsLink 1.113
  • From Dirk T. Verbeek@dverbeek@xs4all.nl to alt.os.linux.ubuntu on Sat Mar 27 22:30:57 2021
    From Newsgroup: alt.os.linux.ubuntu

    Op 27-03-2021 om 18:36 schreef Adam:

    Installed new Ubuntu (/) wiping out old Ubuntu (/) partition.
    Kept old Ubuntu /home partition.

    New Ubuntu install went according to plan except with regards to /home partition.

    Now I believe I have an ownership issue because
    I can't access files from old Ubuntu /home partition (owned by different username).

    GParted shows /home is decently full as expected.
    Just can't access files in old Ubuntu /home partition.

    How to fix ?

    In Kubuntu (Dolphin file manager) I would simply right-click on the
    drive, select properties and next change the owner.
    --- Synchronet 3.18a-Linux NewsLink 1.113
  • From Mike Easter@MikeE@ster.invalid to alt.os.linux.ubuntu on Sat Mar 27 15:13:48 2021
    From Newsgroup: alt.os.linux.ubuntu

    Dirk T. Verbeek wrote:
    schreef Adam:

    Installed new Ubuntu (/) wiping out old Ubuntu (/) partition.
    Kept old Ubuntu /home partition.

    New Ubuntu install went according to plan except with regards to /home
    partition.

    Now I believe I have an ownership issue because
    I can't access files from old Ubuntu /home partition (owned by
    different username).

    GParted shows /home is decently full as expected.
    Just can't access files in old Ubuntu /home partition.

    How to fix ?

    In Kubuntu (Dolphin file manager) I would simply right-click on the
    drive, select properties and next change the owner.

    In Ub Mate live Caja FM, examining the permissions of the default *directories* (not partition), the *home* dir is root's, whereas the 'ubuntu-mate' (user) dir inside the home belongs to the user. That
    might also be the case w/ a home part w/ a user dir inside.


    --
    Mike Easter
    --- Synchronet 3.18a-Linux NewsLink 1.113
  • From Adam@adam@no_thanks.com to alt.os.linux.ubuntu on Sun Mar 28 19:27:53 2021
    From Newsgroup: alt.os.linux.ubuntu

    On 03/27/2021 01:04 PM, Naird Owell wrote:
    Adam wrote:

    Installed new Ubuntu (/) wiping out old Ubuntu (/) partition.
    Kept old Ubuntu /home partition.

    New Ubuntu install went according to plan except with regards to /home
    partition.

    Now I believe I have an ownership issue because
    I can't access files from old Ubuntu /home partition (owned by different
    username).

    GParted shows /home is decently full as expected.
    Just can't access files in old Ubuntu /home partition.

    How to fix ?


    Maybe...

    <https://devconnected.com/how-to-chown-recursive-on-linux/>

    <https://serverfault.com/questions/156437/how-to-chown-a-directory-recursively-including-hidden-files-or-directories>


    Thanks, turns out Ubuntu does smart-install. :-)
    Cuz, install took care of "chown" already.
    What I really needed was to locate the old_user home, which I did...

    xerus@ThinkPad-T430:~$ cd /home
    xerus@ThinkPad-T430:/home$ ls -l
    total 32
    drwxr-xr-x 84 xerus xerus 12288 Mar 14 19:10 old_user
    drwx------ 2 root root 16384 Feb 23 2011 lost+found
    drwxr-xr-x 23 xerus xerus 4096 Mar 28 17:26 xerus
    xerus@ThinkPad-T430:/home$

    --- Synchronet 3.18a-Linux NewsLink 1.113
  • From Jonathan N. Little@lws4art@gmail.com to alt.os.linux.ubuntu on Mon Mar 29 11:56:57 2021
    From Newsgroup: alt.os.linux.ubuntu

    Adam wrote:

    Installed new Ubuntu (/) wiping out old Ubuntu (/) partition.
    Kept old Ubuntu /home partition.

    New Ubuntu install went according to plan except with regards to /home partition.

    Now I believe I have an ownership issue because
    I can't access files from old Ubuntu /home partition (owned by different username).

    GParted shows /home is decently full as expected.
    Just can't access files in old Ubuntu /home partition.

    How to fix ?

    IF you don't install users in the same order as the original the numeric
    UID and GID can be different. Ubuntu starts login users at 1000 and also
    note that sometimes a users GID is not always the same as its UID if
    someone adds a special secondary group. What I do is list all the users
    on a system with UIDs and GIDs. Use can user this one-liner:


    egrep '100[0-9]' /etc/passwd | tr ':' ' ' | awk '{print $1 "\tUID=" $3
    "\tGID=" $4}'


    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    --- Synchronet 3.18a-Linux NewsLink 1.113
  • From Michael F. Stemper@mstemper@gmail.com to alt.os.linux.ubuntu on Tue Mar 30 10:34:39 2021
    From Newsgroup: alt.os.linux.ubuntu

    On 29/03/2021 10.56, Jonathan N. Little wrote:

    IF you don't install users in the same order as the original the numeric
    UID and GID can be different. Ubuntu starts login users at 1000 and also
    note that sometimes a users GID is not always the same as its UID if
    someone adds a special secondary group. What I do is list all the users
    on a system with UIDs and GIDs. Use can user this one-liner:


    egrep '100[0-9]' /etc/passwd | tr ':' ' ' | awk '{print $1 "\tUID=" $3 "\tGID=" $4}'

    That reminds me of something that I was wondering. If I create users on
    a new box, can I give them the same password as on the old one by simply copying the corresponding second field of /etc/shadow from one to the
    other?

    --
    Michael F. Stemper
    The name of the story is "A Sound of Thunder".
    It was written by Ray Bradbury. You're welcome.
    --- Synchronet 3.18a-Linux NewsLink 1.113
  • From Jonathan N. Little@lws4art@gmail.com to alt.os.linux.ubuntu on Tue Mar 30 16:14:15 2021
    From Newsgroup: alt.os.linux.ubuntu

    Michael F. Stemper wrote:
    On 29/03/2021 10.56, Jonathan N. Little wrote:

    IF you don't install users in the same order as the original the numeric
    UID and GID can be different. Ubuntu starts login users at 1000 and also
    note that sometimes a users GID is not always the same as its UID if
    someone adds a special secondary group. What I do is list all the users
    on a system with UIDs and GIDs. Use can user this one-liner:


    egrep '100[0-9]' /etc/passwd | tr ':' ' ' | awk '{print $1 "\tUID=" $3
    "\tGID=" $4}'

    That reminds me of something that I was wondering. If I create users on
    a new box, can I give them the same password as on the old one by simply copying the corresponding second field of /etc/shadow from one to the
    other?


    Yep. I just "upgraded" a system at the library since we use Unity and
    the upgrade path keep reverting to Gnome3 and you have to do the old
    dump Gnome add Unity...so I used a fresh install of Ubuntu Unity Remix
    20.04 <https://ubuntuunity.org/> on one system. So rather than go to the process for each system running 16.04 I just copied the / partition to
    target system, /home is on a separate partition. Check the hosts,
    hostname, mailname, and fstab for proper UUID of this systems /home and
    swap, edit passwd and group to that used and copy the shadow full line
    to replace the user for that UI number. I use a livesession, I reinstall
    grub just in case and then reboot. Done.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    --- Synchronet 3.18a-Linux NewsLink 1.113