:: Re: [DNG] systemd allows elevated a…
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Giovanni Rapagnani
Fecha:  
A: dng
Asunto: Re: [DNG] systemd allows elevated access from unit files?


On 03/07/17 18:23, Joachim Fahrner wrote:
> Am 2017-07-03 17:34, schrieb dev:
>> useradd and adduser work differently. One allows it, the other does not.
>> Just thought 'why not make them work the same?'. That's all.
>
> That's right, that's a bug. They should work the same, and they should
> follow POSIX-rules, not Poettering-rules.


I do not agree. useradd and adduser are not the same thing:
- useradd is a low level utility for adding users
- adduser is a front-end for the low level tool useradd. adduser works
in conjuction with the configuration defined inside /etc/adduser.conf

/etc/adduser.conf has a configuration variable called NAME_REGEX.
username passed to adduser are checked against NAME_REGEX.

NAME_REGEX allow to be more restrictive than POSIX, however it does not
allow to be more permissive.

Hence, if one wants adduser to work as useradd when it comes to username
validity check, one just need to set the NAME_REGEX variable accordingly.

--
Giovanni