BLFS profile group/user checking

Kevin P. Fleming kpfleming at linuxfromscratch.org
Fri May 21 12:04:40 PDT 2004


Kevin P. Fleming wrote:

> Forgot one more item: in my own profile I put this user/group adding 
> into a separate stage (before the Installing stage). I think this is 
> easier to deal with in the user interface, as the stage can be 
> de-selected if the user doesn't want to run it.

(Now I'm just talking to myself :-))

Any use of groupadd _without_ -g (i.e. just let it grab the next 
available group number) can use this:

groupadd -f mysql

This will add a group called "mysql" if there is not currently one, but 
if there is it will just exit and not fail (i.e. the profile will 
continue executing).

Unfortunately useradd does not support this type of thing, so the 
profile will continue to check to see if the new user name already 
exists first.



More information about the alfs-discuss mailing list