Re: non fedora-usermgmt user creation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



mmcgrath@xxxxxxxxxxxxxxxxx (Mike McGrath) writes:

> [... fedora-usermgmt ...]
>
> Walk me through this then, I use fedora-usermgmt to create a user for
> my nagios package.

Ok, let's start at the beginning:

1. you register your user in the wiki. Wiki-locking/verifying your
   changes should guarantee uniqueness for the chosen uid and username

2. you use fedora-usermgmt in your spec file e.g. in the suggested
   way. The %pre script will contain something like

   | fedora-useradd <uid> -r <params> <user>

3. user installs your package with 'yum --install <package>'; depsolver
   installs 'fedora-usermgmt'


Now, there are two possibilities:

3.1.  user did not configured 'fedora-usermgmt' (e.g. only a
      single-machine system, has objections against fedora-usermgmt)

      --> the <uid> hint in 'fedora-useradd <uid> <params>' will be
      ignored and your user created like 'useradd <params>'; e.g.

      | fedora-useradd 42 -r ... nagios

      becomes

      | useradd -r ... nagios

      In this case, the uid is not predictable and probably different on
      another machine.

3.2   user configured 'fedora-usermgmt', which includes:
      * executing the 'alternatives' command (or creating the symlinks
        in another way)
      * filling '/etc/fedora/usermgmt/baseuid' with an value fitting
        into his system (e.g. the baseuid - (baseuid+1000)[1] uid range
        should be reserved for Fedora Extras packages)

      --> the <uid> hint in 'fedora-useradd <uid> <params>' will be
      honored. Current fedora-usermgmt uses a mapping function of

                        realuid = baseuid + uid

      So, when your 'nagios' user would have a registered uid of 42 and
      /etc/fedora/usermgmt/baseuid would contain 63000, then

      | fedora-useradd 42 -r ... nagios

      would result into

      | useradd -u 63042 -r ... nagios


      When 'fedora-usermgmt' was enabled on all machines, and 'baseuid'
      has the same content there, the same 'useradd -u ...' command will
      be executed and your 'nagios' user will have an uid of '63042'
      everywhere and everytime.


> What uid does it select, how does it select that UID, and when you
> install it on your machine, how does it have the same UID that it did
> when it was installed on my machine?

'fedora-usermgmt' does not create the same uid on your and on my
machine. But because we do not share a common filesystem, I do not
see much sense in it.




Enrico

Footnotes: 
[1]  the range of 1000 uids is just a raw estimation; 200 would be
     probably enough in the next years too

Attachment: pgp2oWK9d8LDj.pgp
Description: PGP signature

-- 
fedora-extras-list mailing list
fedora-extras-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-extras-list

[Index of Archives]     [Fedora General Discussion]     [Fedora Art]     [Fedora Docs]     [Fedora Package Review]     [Fedora Desktop]     [Big List of Linux Books]     [Yosemite Backpacking]     [KDE Users]

  Powered by Linux