Results 1 to 10 of 10

Thread: Setting multiple UIDs?

  1. #1
    Join Date
    Jan 2009
    Location
    Taft, Republic of California. UTC -8
    Posts
    1,474

    Default Setting multiple UIDs?

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

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,114

    Default Re: Setting multiple UIDs?

    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.
    Last edited by hcvv; 21-May-2013 at 09:08.
    Henk van Velden

  3. #3
    Join Date
    Jan 2009
    Location
    Taft, Republic of California. UTC -8
    Posts
    1,474

    Default Re: Setting multiple UIDs?

    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.
    Tumbleweed

  4. #4
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    17,054

    Default Re: Setting multiple UIDs?

    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

  5. #5
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,607
    Blog Entries
    3

    Default Re: Setting multiple UIDs?

    Quote Originally Posted by FlameBait View Post
    I need write access to this stuff.
    Code:
    # 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.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  6. #6
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,114

    Default Re: Setting multiple UIDs?

    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"
    Code:
    henk@boven:~> su -
    Password:
    (mind the -)
    Then change your working directory to the place where those file are:
    Code:
    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).
    Code:
    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
    Code:
    exit
    and let flaimbait/1000 check if he can use them now.
    Henk van Velden

  7. #7
    Join Date
    Jan 2009
    Location
    Taft, Republic of California. UTC -8
    Posts
    1,474

    Default Re: Setting multiple UIDs?

    Will that command reach into all subdirectories as well?
    Tumbleweed

  8. #8
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,607
    Blog Entries
    3

    Default Re: Setting multiple UIDs?

    Quote Originally Posted by FlameBait View Post
    Will that command reach into all subdirectories as well?
    Yes. That's the "-R" option (recursively descend into directories).
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  9. #9
    Join Date
    Jan 2009
    Location
    Taft, Republic of California. UTC -8
    Posts
    1,474

    Default Re: Setting multiple UIDs?

    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.
    Tumbleweed

  10. #10
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,114

    Default Re: Setting multiple UIDs?

    Quote Originally Posted by FlameBait View Post
    Will that command reach into all subdirectories as well?
    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:
    Code:
    man chown
    And of course you shouls learn from it
    Henk van Velden

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •