Hi Thomas,

This is a difficult question...

On Wed, 2007-05-02 at 22:12 +0200, Thomas Wagner wrote:
> as an example, if I want to create a SMF entry for a daemon.
> 
> To run the daemon with a specific, non-provileged userid, a 
> separate user has to be created and the name will be stored
> in a SMF-propery.
> 
> How should a SFE package behave at pkgadd: 
> 
>  1) if the userid is missing, just create it with useradd 
>     and let solaris choose the next free numeric ID

I'm sure that many sysadmins won't like this.  Like you say
below, they can create it before installing the package,
but how do they find out that they are supposed to do that?

> or
> 
>  2) ask the user about the username / userid

No, interactive package installation is not a good idea.

> or 
> 
>  3) provide a script, to be edited by the user after 
>     pkginstall and run manually
>     no SMF property would be created, user has to read 
>     SFE<package>-README/INSTALL files

Hmm... too much manual work...

> or
>  
>  4) choose e.g. nobody and let the user change this
>     in SMF, chown files if already created by the daemon
>     (logs, databases, ...)
> 
> 
> I would like to do 1) as many (all?) distros do. If an
> Administrator does not want the generated userid, he can 
> create it before pkgadd.

Perhaps another option is a preinstall script that checks
if the user id exists and if not, if stops with a message
explaining what to do and exit 1.

Laca



Reply via email to