[OE-core] Tinylogin or shadow?

Koen Kooi koen at dominion.thruhere.net
Thu Dec 1 14:56:48 UTC 2011


Op 1 dec. 2011, om 14:01 heeft Martin Jansa het volgende geschreven:

> On Tue, Sep 06, 2011 at 07:30:31PM +0100, Phil Blundell wrote:
>> On Tue, 2011-09-06 at 11:20 +0200, Martin Jansa wrote:
>>> Hi,
>>> 
>>> if someone wants to use only shadow as login manager, then all postinst
>>> calling adduser (instead of useradd) are failing ie:
>>> 
>>> recipes-connectivity/avahi/avahi.inc:   grep "^avahi:" /etc/passwd > /dev/null || adduser --disabled-password --system --home /var/run/avahi-daemon --no-create-home avahi --ingroup avahi -g Avahi
>>> recipes-connectivity/avahi/avahi.inc:   grep "^avahi-autoipd:" /etc/passwd > /dev/null || adduser --disabled-password --system --home /var/lib/avahi-autoipd --no-create-home avahi-autoipd --ingroup avahi-autoipd -g "Avahi autoip daemon"
>>> recipes-connectivity/openssh/openssh_5.8p2.bb:          adduser --system --home /var/run/sshd --no-create-home --disabled-password --ingroup sshd -s /bin/false sshd
>>> recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb:      adduser --system --home /dev/null --no-create-home --empty-password --ingroup nogroup -s ${sbindir}/ppp-dialin ppp
>>> recipes-core/dbus/dbus.inc:             adduser --system --home "$MESSAGEHOME" --no-create-home --disabled-password \
>>> recipes-devtools/distcc/distcc_2.18.3.bb:               grep distcc /etc/passwd || adduser --system --home /dev/null --no-create-home --empty-password --ingroup nogroup distcc
>>> recipes-graphics/x11-common/xserver-nodm-init.bb:        adduser --disabled-password $username
>>> recipes-multimedia/pulseaudio/pulseaudio.inc:            adduser --disabled-password --home=/var/run/pulse --system \
>>> recipes-support/hal/hal.inc:    grep haldaemon /etc/passwd || adduser --disabled-password --system --home /var/run/hald --no-create-home haldaemon --ingroup haldaemon -g HAL
>>> 
>>> What is preferred fix,
>> 
>> I guess the first part of any preferred fix is going to have to be to
>> get the postinsts to be consistent about what mechanism they use for
>> adding users, rather than the mélange of different approaches that we
>> seem to have today.  Ideally I think that would be by means of making
>> the recipes in question use useradd.bbclass.  It might also be
>> reasonable to extend useradd.bbclass to work with tinylogin and/or
>> busybox's implementations of useradd if it doesn't already.
>> 
>> If there are recipes which can't use useradd.bbclass for whatever reason
>> then I guess they should be adjusted to call useradd rather than
>> adduser, since the former is the more standardized of the two.
>> 
>> As for tinylogin's adduser, I am inclined to say that it should probably
>> just go away in favour of a wrapper around (ideally a generic) useradd.
> 
> just small update on this, from my original list only 2 recipes are
> still not using useradd.bbclass:
> 
> recipes-connectivity/avahi/avahi.inc:   grep "^avahi:" /etc/passwd > /dev/null || adduser --disabled-password --system --home /var/run/avahi-daemon --no-create-home avahi --ingroup avahi -g Avahi
> recipes-connectivity/avahi/avahi.inc:   grep "^avahi-autoipd:" /etc/passwd > /dev/null || adduser --disabled-password --system --home /var/lib/avahi-autoipd --no-create-home avahi-autoipd --ingroup avahi-autoipd -g "Avahi autoip daemon"
> recipes-devtools/distcc/distcc_2.18.3.bb:               grep distcc /etc/passwd || adduser --system --home /dev/null --no-create-home --empty-password --ingroup nogroup distcc
> 
> Is someone using them? Any volunteer to migrate them and test them?

I'm in java hell right now, but I'll try to fix those after that. But it would be nice if someone beats me to it :)

regards,

Koen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20111201/fa781fe1/attachment-0002.sig>


More information about the Openembedded-core mailing list