[OpenWrt-Devel] No users added while installing packages

Denis Shulyaka shulyaka at gmail.com
Sun Nov 2 03:35:46 EST 2014

Hi Mike,

2014-11-01 20:45 GMT+03:00 W. Michael Petullo <mike at flyn.org>:

> 1. lighttpd, which makes use of user_add in /etc/init.d/lighttpd,
> created an http user, but it was not assigned a UID.

According to /lib/functions.sh, user_add has the following arguments:

user_add() {
        local name="${1}"
        local uid="${2}"
        local gid="${3:-$2}"
        local desc="${4:-$1}"
        local home="${5:-/var/run/$1}"
        local shell="${6:-/bin/false}"

So, if you don't provide UID as a second argument, the user would be
created without UID. Same for group_add.

3. postfix, which provides a create_users shell function in
> /etc/init.d/postfix, did not create a user. Not that /etc/init.d/postfix
> does not explicitly call the create_users function.

postfix package executes the following command in its postinst script:

EXTRA_COMMANDS=create_users /etc/init.d/postfix create_users

It successfully creates users on my system. Could you please test it again
on your system by running just the above command?

> I am also curious to know
> how packages should reserve a UID; for example, postfix seems to assume
> that no other package will claim 87 and 88.

For postfix, I just picked those UIDs that were unlikely to be used by a
user. Then I checked the repository and couldn't find any other packages
using same UIDs. Please advise if there is a better way.

Best regards,
Denis Shulyaka
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20141102/0898cebd/attachment.htm>
-------------- next part --------------
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list