Setting multiple UIDs?

Can you set multiple UIDs for a user with YAST User Administration?
If so how? My Google search was not rewarding.

What do you mean with “multiple UIDs for a user”?

You define a user (the personality that can login, not the physical person) in the system (using YaST or other means) with a UID (that is a number, often from 1000 upwards to destinguish the from so called “system users”). THat UID has a easy to remember (for human beings) name attached to it: the username.

So when you mean with “user” in your question “username”, the the answer is: you can’t. Because there is a one to one relation between username and UID.

When you mean with “user”, a person, then the answer is of course yes, because the system has no knowledge about physical persons, it only knows users by username/UID.
And of course this last way of working on a multi user system as Linux, is rather normal. On many (specialy home) systems it is the same physical person that hs at least two users: one “normal” and root. I have three or four “normal” ones on my system. Very good to keep different roles you have (like chairman of the local sportsclub on one side, your daily self with your banking, personal mails, etc. on the other side), apart.

Maybe you should explain a bit more on what you want to achieve.

I have files owned by UID 500 on my system.
That was a carry over from a very long time ago.
In the past I’ve just changed my user id to 500. 500 was from way back when I ran Mandriva which later Mandrake and before I converted to openSUSE around 10.2 and kept the UID 500.
This time on a clean install of 12.3 I didn’t do that. User id 1000 is the default starting point for openSUSE.
I can not write to those folders ( many, many directories and files across several terabytes of hard drives both internal and external ) and I have had no success on several drives sub directories with the method I am using.
Trying to change the properties of those drives to reflect that I am the owner of the directories and files. I am not good at the CLI and I stay away from that and use Konqueror and the properties dialog from kdesu konqeror so I have elevated permission to change ownership ect.

So it would be simpler if I had both UIDs 1000 and 500 at the same time.

I need write access to this stuff.


# cd top-directory
# chown -R flamebait .

This recursively changes ownership down the directory tree.

Note: that is intended to refer to the top directory of the disk or hierarchy you are talking about. DO NOT do this in the root directory of your current install.

On Tue, 21 May 2013 16:26:02 +0000, FlameBait wrote:

> I have files owned by UID 500 on my system.
> That was a carry over from a very long time ago.
> In the past I’ve just changed my user id to 500. 500 was from way back
> when I ran Mandriva which later Mandrake and before I converted to
> openSUSE around 10.2 and kept the UID 500.
> This time on a clean install of 12.3 I didn’t do that. User id 1000 is
> the default starting point for openSUSE.
> I can not write to those folders ( many, many directories and files
> across several terabytes of hard drives both internal and external ) and
> I have had no success on several drives sub directories with the method
> I am using.
> Trying to change the properties of those drives to reflect that I am the
> owner of the directories and files. I am not good at the CLI and I stay
> away from that and use Konqueror and the properties dialog from kdesu
> konqeror so I have elevated permission to change ownership ect.
>
> So it would be simpler if I had both UIDs 1000 and 500 at the same time.
>
> I need write access to this stuff.

You can’t have multiple UIDs. Users in Linux have one UID.

You need to change the ownership on the files. The easiest way to do this
is the CLI:

chown -R [user]:[group] .

From the directory that’s the root of the files to change. Specify your
username for [user] and “users” for [group]. You’ll have to do this as
root.

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Wouldn’t it be better to solve this once and for all? IMHO you must make 1000 the owner of those files, then all is settled. I do not know what the group is that owns those files, when it is not the same as the group 1000 belongs to, change that also (by default the group users is used by openSUSE, thus I will use that in my example).

Best is to “become root”

henk@boven:~> su -
Password:

(mind the -)
Then change your working directory to the place where those file are:

cd /place/wwhere/the/files/are/

Check if you are at that place (not long ago someone was ssloppy with doing something like this and borked his system).

chown -R flaimbait:users *

I assume that you can fill in the correct names. If in doubt, ask here ((and do not forget to add listings then like ls -l of the place where those files start in the tree).
When ready

exit

and let flaimbait/1000 check if he can use them now.

Will that command reach into all subdirectories as well?

Yes. That’s the “-R” option (recursively descend into directories).

OK
Thanks to all.

I’ve got all the directories and files on all the drives ownership change to the default flamebait users now.
Problem solved.

When we provide you with commands, those are allways suggestions. You should try to find out what they do to protect your system against errors made by people:

man chown

And of course you shouls learn from it :wink: