DevHeads.net

user # access?

Running Ubuntu 16.04 updated. I have a few disks from my older linux
comps, even way back to Mandriva :-), and I'd like to check for some
info on those disks. When I try to access them, I can't. Says owner is
user# 501, etc and I don't have any permissions. Tried installing
Nautilus-admin but that doesn't work either. How can I access my old
disks via a GUI so I can easily see all and copy some if necessary?
These will not be used to boot, so I don't mind altering those disks
if necessary. All have different users/passwords/OS if that makes a
difference.

Tried a few I knew were from Mandriva - looks like they all use 500+.
Not good - I used MD for quite a while and have several
disks. :-(( Liked it a lot at the time, though.

Comments

Re: user # access?

By Robert Heller at 05/14/2019 - 23:20

Well, you are not going to able to use a GUI out-of-the-box, unless you login
to the GUI as root -- not something that is normally possible with an
out-of-the-box install of Ubuntu (and is not something that is recomended even
on a Linux distro with a real root login).

You are going to have do one of two things:

1: Use a shell command like:

sudo chown -R <your user id or username> /path/to/old/disk/home

This will make the disk readable.

OR

create additional usernames that have the sane UID as the files you want to
look at.

Re: user # access?

By rikona at 05/15/2019 - 19:16

On Tue, 14 May 2019 23:20:39 -0400 (EDT)

I just tried this on one of the Mandriva [501] disks. It had a separate
home partition, so the disk shows up as 2 volumes. Trying to fix the
home partition with:
sudo chown -R 1001 /media/rik/6ab9df80-9f61-11d8-9c51-e5f8ab4ddba5
did not seem to work. I can now see the 2 users in home BUT essentially
everything inside the users is gone. The main user, with most of the
stuff, has only tmp [empty, which may be correct], and 4 dot files -
nothing else. What happened, and how can I get back the stuff that was
likely there originally?

Re: user # access?

By Colin Law at 05/16/2019 - 03:45

On Thu, 16 May 2019 at 00:19, rikona < ... at sonic dot net> wrote:
chown will not have removed anything. What do you see if you run
sudo ls -l /media/rik/6ab9df80-9f61-11d8-9c51-e5f8ab4ddba5/home/<username>

Colin

Re: user # access?

By rikona at 05/15/2019 - 00:26

On Tue, 14 May 2019 23:20:39 -0400 (EDT)

Sounds good. This sounds like a permanent change - easier if I need to
do this again/periodically.

This sounds better - I have to access several disks. But, I need a few
UIDs. Is there an easy way to change the UID for the same added user
when I need to access multiple UIDs [for multiple users] on each
old disk? If not, it may be easier to create 5-6 added users. BTW, does
each added user have to have admin access to make this work via a GUI?

Thanks much for the help!!

Re: user # access?

By Robert Heller at 05/15/2019 - 08:53

Each of the additional users does not need admin access to access *their*
files. Generally common *system* files are going to readable by everyone, and
some config files will be readable and some will be protected, but it sounds
like you probably don't need to mess with that sort of thing.

Generally, if these were systems where there was only one user (you) you
probably won't need more than 2-3 of these users, since each distro will
probably default to a partitular starting UID -- eg some will start with 500
and some with 1000 or something.

Re: user # access?

By oxy via ubuntu-users at 05/15/2019 - 00:24

On Tue, 14 May 2019 23:20:39 -0400 (EDT), Robert Heller wrote:
That is generalized nonsense.

Without root privileges a GUI app such as

gparted

is useless! It is strongly recommended to run the GUI app gparted with
root privileges!

My Ubuntu 16.04 install isn't an OOTB install, but among other I've got
the

Ubuntu-Mate 18.04.1 live DVD
Xubuntu 18.10 live DVD
Ubuntu-Budgie 19.04 live DVD

at hand.

Usually I'm using those live DVDs to backup my Ubuntu 16.04 and Arch
Linux installs, but sometimes I'm using a GUI with root privileges to
access home of a user with incompatible UID and GID.

If a file browser is wanted I recommend to install caja when running
Xubuntu or Ubuntu-Budgie live media.

sudo apt update
sudo apt install caja

Ubuntu-Mate comes with it by default.

Open the terminal and run

sudo -i

then run

caja

close caja and run another GUI app.

When not using one of those live DVDs consider to start a X session
instead of a Wayland session. Install the package gksu. After that
start GUI apps with gksudo. For example

gksudo caja

Regards,
Ralf

Re: user # access?

By rikona at 05/15/2019 - 13:11

On Wed, 15 May 2019 06:24:39 +0200

Sounds like using a Mate DVD on an older unused box might be one way
to go [although not sure it has 2 working USB ports].

Why close it? It would to seem be able to access the old files on an
attached USB drive, as root, and I could copy them to a second attached
USB disk. But, then, would the copied files be owned by root and thus
not be easily accessable on the second attached USB drive?

This is what I used to do [but not with caja] even in Ubuntu - it worked
well. I wish there was something similar now. Any reason why there is
not?

Thanks for your many suggestions.

Re: user # access?

By Robert Heller at 05/15/2019 - 08:53

Yes, but one can use sudo for that. I do that with virt-manager on my CentOS
machine. Using a system *logged in as root to the full GUI desktop* is
dangerous and not recomended, most certainly not for day-to-day use, although
sometimes needed for special admin tasks. The OP is (obviously) something of a
newby and NOT an experienced system admin. The recomendation in his case is to
not login as root -- he is likely to get himself in serious trouble, and for
what he is doing, there are other, safer options.

Re: user # access?

By rikona at 05/15/2019 - 13:11

On Wed, 15 May 2019 08:53:58 -0400 (EDT)

I DO understand the dangers and would not do that unless it was very
temporary and there was no other way.

Newby is an interesting word. It suggests "new to comps" but misses the
issue. I've been using personal comps since CPM, so they're not new to
me. But, I'm a user of just another tool, and I learn just enough about
this VERRRY complex tool to do the task at hand. In that respect I'm
probably just like most users. But, if I do have a problem I first
search for a solution and see if I can fix it on my own. If I can't put
the pieces together to get a solution I may contact the list, but only
as a last resort. I do appreciate the help from the very knowledgeable
folks on this list!

Part of the issue is that I've had 3-6 users on my local comps and I
need to access, and copy parts of, all the info on the old disks.

Re: user # access?

By Robert Heller at 05/15/2019 - 13:57

I merely meant you were new to Linux (from an admin POV).