add a daemon user

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

add a daemon user

Wesley MOUEDINE ASSABY
Hi,

To add a "daemon user" like for example _nginx :

useradd -L daemon -d /var/empty -s /sbin/nologin -g =uid _nginx

Is this enough ?

Thank you very much.

Cheers,

Wesley

Reply | Threaded
Open this post in threaded view
|

Re: add a daemon user

Tim Hoddy
On Tuesday 29 Jan 2013 21:06:11 Wesley M.A. wrote:

> To add a "daemon user" like for example _nginx :
>
> useradd -L daemon -d /var/empty -s /sbin/nologin -g =uid _nginx
>
> Is this enough ?

Is there a '-L' option?

Reply | Threaded
Open this post in threaded view
|

Re: add a daemon user

Jérémie Courrèges-Anglas-2
In reply to this post by Wesley MOUEDINE ASSABY
"Wesley M.A." <[hidden email]> writes:

> Hi,

Hi

> To add a "daemon user" like for example _nginx :
>
> useradd -L daemon -d /var/empty -s /sbin/nologin -g =uid _nginx
>
> Is this enough ?

[...]

Depends.  Your _nginx user will likely serve files, you don't want to put
them in /var/empty, which is where other daemons chroot.  Do you want to
chroot?  Why not use the www user?  Why not use the devel nginx package,
if you need a more recent version?

--
Jérémie Courrèges-Anglas
GPG Key Fingerprint: 61DB D9A0 00A4 67CF 2A90  8961 6191 8FBF 06A1 1494

Reply | Threaded
Open this post in threaded view
|

Re: add a daemon user

Wesley MOUEDINE ASSABY
Le 2013-01-29 21:40, [hidden email] a écrit :

> "Wesley M.A." <[hidden email]> writes:
>
>> Hi,
>
> Hi
>
>> To add a "daemon user" like for example _nginx :
>>
>> useradd -L daemon -d /var/empty -s /sbin/nologin -g =uid _nginx
>>
>> Is this enough ?
>
> [...]
>
> Depends.  Your _nginx user will likely serve files, you don't want to
> put
> them in /var/empty, which is where other daemons chroot.  Do you want
> to
> chroot?  Why not use the www user?  Why not use the devel nginx
> package,
> if you need a more recent version?

I want to make work mailserv (ie mailserv.github.com) on OpenBSD-5.2
When i install it, _nginx was not created.
It is why my question.

Thank you.

--
Wesley

Reply | Threaded
Open this post in threaded view
|

Re: add a daemon user

Alexander Hall
In reply to this post by Tim Hoddy
On 01/29/13 18:23, Tim Hoddy wrote:
> On Tuesday 29 Jan 2013 21:06:11 Wesley M.A. wrote:
>
>> To add a "daemon user" like for example _nginx :
>>
>> useradd -L daemon -d /var/empty -s /sbin/nologin -g =uid _nginx
>>
>> Is this enough ?
>
> Is there a '-L' option?

The man page states so. Shouldn't it be?

Reply | Threaded
Open this post in threaded view
|

Re: add a daemon user

Tim Hoddy
On Tuesday 29 Jan 2013 21:52:46 Alexander Hall wrote:

> On 01/29/13 18:23, Tim Hoddy wrote:
> > On Tuesday 29 Jan 2013 21:06:11 Wesley M.A. wrote:
> >> To add a "daemon user" like for example _nginx :
> >>
> >> useradd -L daemon -d /var/empty -s /sbin/nologin -g =uid _nginx
> >>
> >> Is this enough ?
> >
> > Is there a '-L' option?
>
> The man page states so. Shouldn't it be?

It should.  I did a 'man useradd' from a shell on a Linux m/c.

Apologies.

Reply | Threaded
Open this post in threaded view
|

Re: add a daemon user

Stuart Henderson
In reply to this post by Wesley MOUEDINE ASSABY
On 2013-01-29, Wesley M.A. <[hidden email]> wrote:

> Le 2013-01-29 21:40, [hidden email] a écrit :
>> "Wesley M.A." <[hidden email]> writes:
>>
>>> Hi,
>>
>> Hi
>>
>>> To add a "daemon user" like for example _nginx :
>>>
>>> useradd -L daemon -d /var/empty -s /sbin/nologin -g =uid _nginx
>>>
>>> Is this enough ?
>>
>> [...]
>>
>> Depends.  Your _nginx user will likely serve files, you don't want to
>> put
>> them in /var/empty, which is where other daemons chroot.  Do you want
>> to
>> chroot?  Why not use the www user?  Why not use the devel nginx
>> package,
>> if you need a more recent version?
>
> I want to make work mailserv (ie mailserv.github.com) on OpenBSD-5.2
> When i install it, _nginx was not created.
> It is why my question.
>
> Thank you.
>
> --
> Wesley
>
>

OpenBSD now normally runs nginx as the "www" user.