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

Re: useradd -r switch



On Wed, Feb 14, 2001 at 10:25:43PM +1100, Christopher Yeoh wrote:
> A starting point for standardising its behaviour could be this excerpt
> from a man page:
> 
>        -r     This flag is used to create a system account. That is,  an  user
>               with   an   UID   lower   than   value  of  UID_MIN  defined  in
>               /etc/login.defs. Note that useradd will not create a home direc­
>               tory  for  such  an  user,  regardless of the default setting in
>               /etc/login.defs.  You have to specify -m option if  you  want  a
>               home  directory  for a system account to be created.  This is an
>               option added by Red Hat.
 
 Starting point on the LSB meeting in San Francisco was to say: 
 mareks last version of useradd is the standard. So let us stick
 to his upstream version first.

 Should we really standardize the way minimal or maximal UIDs are
 configured? I´d see this that as in the responsability of
 the local sysadmin. 

 But we could ask marek to accept a patch which is searching for 
 configuration values SUID_MIN, SUID_MAX in
 /etc/login.defs for system users, if a -r switch is issued. 
 I will do that if I find the time.

> It probably needs some extra work - eg it doesn't specify what happens
> if all the UID's less than UID_MIN are already taken.

useradd gives up with an error message if the possible UID range is
exhausted. This is good. Useradd could be called by stupid scripts. 

The local sysadmin can override this with the -O switch, so he has
a way to do it. 

BUT: We should FORBID 3rd party software to use the -O switch. If we
fail to do so, 3rd party software can evade whgatever discipline the
local sysadmins wants to set up.
-- 
     ______   ___        
    /  ___/__/  /                 Caldera (Deutschland) GmbH          
   /  /_/ _  / /__        Naegelsbachstr. 49c, 91052 Erlangen, Germany 
  /_____/_/ /____/            software developer / lsb project 
 ==== /____/ =====   Dipl. Inf. Johannes Poehlmann, mail: jhp@caldera.de
Caldera OpenLinux    phone: ++49 9131 7192 335, fax: ++49 9131 7192 399



Reply to: