| View previous topic :: View next topic |
| Author |
Message |
bettercom n00b


Joined: 30 May 2003 Posts: 3 Location: Hamburg, Germany
|
Posted: Fri May 30, 2003 11:26 am Post subject: New system user needed in ebuild script |
|
|
Working on an ebuild for nullmailer I would like to know how to determine an unique uid/gid which I need in the script.
Who assigns these ids used in several other ebuild's where system users are needed?
How can I prevent id collisions without grepping through other ebuild-files? |
|
| Back to top |
|
 |
duff Guru


Joined: 19 Jun 2002 Posts: 466 Location: Clemson, SC
|
Posted: Sat May 31, 2003 2:29 am Post subject: |
|
|
In /usr/lib/portage/bin/extra_functions.sh there are functions for adding users/groups it that what you're looking for?
| Code: | # Simplify/standardize adding users to the system
# vapier@gentoo.org
#
# enewuser(username, uid, shell, homedir, groups, extra options)
#
# Default values if you do not specify any:
# username: REQUIRED !
# uid: next available (see useradd(8))
# note: pass -1 to get default behavior
# shell: /bin/false
# homedir: /dev/null
# groups: none
# extra: comment of 'added by portage for ${PN}'
|
|
|
| Back to top |
|
 |
bettercom n00b


Joined: 30 May 2003 Posts: 3 Location: Hamburg, Germany
|
Posted: Sat May 31, 2003 8:35 am Post subject: |
|
|
Not really.
The problem goes a little deeper: Creating a new user/group in an ebuild without assigning a fixed uid/gid may collide with other ebuilds (installed in future) which make use of a fixed uid/gid.
Assigning a fixed uid/gid requires a central instance which keeps track of these ids.
This topic is now discussed on the gentoo-dev mailing list.
BTW: Is there webinterface to former postings on the several lists?
Last edited by bettercom on Tue Jun 03, 2003 5:40 am; edited 1 time in total |
|
| Back to top |
|
 |
duff Guru


Joined: 19 Jun 2002 Posts: 466 Location: Clemson, SC
|
Posted: Sat May 31, 2003 4:02 pm Post subject: |
|
|
| bettercom wrote: | | BTW: Is there webinterface to former postings on the several lists? | here's the dev-list...not sure about the others |
|
| Back to top |
|
 |
|