%useradd/%groupadd macros

Andrzej Krzysztofowicz ankry at green.mif.pg.gda.pl
Thu Feb 24 15:07:30 CET 2005


Elan =?iso-8859-1?q?Ruusam=E4e?= wrote:
> 
> hi
> 
> messed it up, produced something:
> http://glen.alkohol.ee/pld/useradd.txt

Good work.

> comments welcome!
> you can ./builder -bb goddammit.spec and later see the scripts result:
> rpm -qp --scripts goddamnit-6.6.6-77.noarch.rpm | less
> 
> known issues
> - you may not do shell-style wrapping with backslashes when using these macros
> - it is impossible (afaik) to have arguments with spaces
> - -c is working with spaces (logically) only if it's FINAL argument

Maybe it would help if we assume that no word contained in -c argument may
begin with "-" ?

> unresolved issues
> - specifying default values. which ones? (few implemented already)
> - which args enforce, which allow specifying (-r is forced currently)
> - implement only useradd/groupadd args that are currently used? (the list is 
> short, ca 105 packages using /usr/sbin/useradd)
> 
> mostly used args are: -u -g -d  -s -c
> rarely: -G
> never (for example): -k

Defaults (IMO):
- missing uid / default group / gid should generate an error
- default shell /bin/false
- default comment - none
- default homedir - /usr/share/empty

-- 
=======================================================================
  Andrzej M. Krzysztofowicz               ankry at mif.pg.gda.pl
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Gdansk University of Technology




More information about the pld-devel-en mailing list